Is half life literal?

Like, caffeine has a half life of 6 hours. So if I had 4 cups of coffee at 10 am then went to bed at 10 pm, that would be the same as drinking a single cup of coffee right before going to bed? Or is it more complicated than that?