Tea actually has less caffeine than coffee does.
When you make tea it takes less tea to make the tea because you're usually making a cup of tea or even a pitcher of tea using a tea bag.
That one tea bag it takes to make a pitcher of tea contains less caffeine than a pot of coffee does.
When you make a pot of coffee you use around 8 to 10 spoons of coffee which means you're using more caffeine to make that amount of coffee.
So a cup of tea contains a lot less caffeine than a cup of coffee does even when the same size of cup is used.
If you need to watch your caffeine intake then tea is much better than too much coffee.
Also caffeine can keep some people awake so if you're having trouble sleeping then drinking too much coffee could be the culprit.