It generally takes about 5 to 6 hours for half of the caffeine to be eliminated from the body. However, this can vary depending on age, liver function, and pregnancy status.