Here's some more interesting formulas:
Energy as you know it for your house is measured in kWh, but the actual unit is Joule.
1 J = 1 Ws (Watt.second)
3600 seconds in an hour so:
3.6 kJ = 1 Wh
If we are working towards energy burned (not just energy pumped into the pedals) there's a crux. You are not an efficient machine. Your mechanical efficiency is somewhere between 20-25% so you have to multiply this value by something between 4 and 5. To get to food calories you would then divide this again by 4.2. Let's assume 4.667 as your efficiency then we have:
1Wh (into the pedals) = 4 Cal (energy required)
Carbohydrates come in at 4 Cal/gram, so:
1Wh (into the pedals) = 1 gram of carbs required.
If you don't like the guess of efficiency, the answer would be 0.86 - 1.07 grams of carbs.
This gets quite interesting. Power along at 200W and you need a whopping 200 grams of carbs every hour! Even gut trained pro's can't get up to 100, so what gives? Well, at lower intensities your body will burn some fat, and if you are well rested you should have around 100g of glycogen stores in your liver, and another 400g in your muscles.
How I use this info on race day:
Let's assume a 4 hour race with average power in the upper 200s. There will be some fat metabolisation, but generally not a high percentage as the intensity is mostly too high. There is also some energy still coming in from my giant breakfast at the start, so I'm comfortable assuming that I'm burning about 800g carbs during this race. This means I need to consume 300g, or 75g/h to avoid the bonk. With some minor gut training and using multiple sources of carbs (with different absorption mechanisms) this is quite attainable. I generally go a bit higher to be safe, but I make sure to count every carb I'm taking with me.
I see folks doing one bottle of drink mix (50g) and one bottle of water with 2 or 3 gels (50g/75g) wondering why they run out of steam 3 hours into intense rides. Eat more folks.