Runtime calculations?

So what is the basic formula for calculating runtime? For example, a XML T6 drawing about 2.74A at the tailcap and putting out about 672 lumens at 30 seconds. Running on a 4000mah 26650 cell.
I need the formula to figure that, plus other levels.

4000mAh (=4Ah) means that you can run the cell for one hour at 4 amps, or two hours at 2 amps, or 1.46 hours at 2.74 amps.

The real world is of course a bit more complicated: depending on the type of driver and led, the current changes (lowers) during the drainage of the battery, so actual runtime is usually bit longer than that.

Cool. I knew it was a simple calculation, but never did see what it was. And just appx is what I was looking for.
Thanks!

Thanks