(The amount of gas in cubic feet) divided by ((your average depth in ATA) times (your surface air consumption rate in cubic feet per minute))
So an aluminum 80 filled to 3000 psi is 77.4 cubic feet. On a dive to 60 feet [assume square profile for kicks].
Assuming a SAC of .8
First the safety stop: 15 ft = 1.45 ATA. 3 minutes. .8 SAC. That's 3.5 cuft
77.4 - 3.5 = 73.9 cuft remaining.
Assume a 30 ft/min ascent from 60 feet. That's an average of 30 feet over 2 minutes:
30 ft = 1.91 ATA. 2 minutes, .8 = 1.91 * 2 * .8 = 3.05 cuft
73.9 - 3.05 = 70.85.
60 ft = 2.82 ATA. 2.82 * x * .8 = 70.85 cuft. so 70.85 / (2.82*.8) = x = 31 minutes
Now if you want to plan for 500 cuft in reserve:
500/3000 = .167 .167 * 77.4 cuft = 12.9 cuft reserve.
70.85 cuft - 12.9 cuft = 57.95 cuft
57.95 / (2.82 * .8) = 25 minutes.
Now how you figure out your SAC rate is based on data from previous dives.
Record your starting and ending pressure for each dive. Get your time and average depth from your computer.
Let's go with 3000 psi starting, 750 psi ending, aluminum 80, 45 feet average depth for 50 minutes.
3000- 750 = 2250
2250 / 3000 = 75% of tank
.75 * 77.4 = 58.05 cuft
(45 ft + 33) / 33 = 2.36 ATA
58.05 cuft / (2.36 * 50 minutes) = .49 cuft/minute at 1 ATA
If you record your time and pressure when you begin your ascent, and get your average depth for your ascent and your average depth for your dive minus ascent, you can start collecting "work" consumption rates and "resting" consumption rates to allow for more complex and more accurate dive planning.