Tank Fill & Drain Time Calculator
Enter the capacity and the inflow and outflow rates to find the time until the tank is full or empty.
How it is calculated
Net flow rate = inflow rate − outflow rate (the rates are assumed to be constant).
- Net flow positive (the water level rises): time to fill = (capacity − starting amount) ÷ net flow rate
- Net flow negative (the water level falls): time to empty = starting amount ÷ (−net flow rate)
- Net flow 0: the amount of water does not change.
With only an inflow (outflow empty), or only an outflow (inflow empty), the same formulas apply. The calculation uses exact fractions, and the time is shown as hours, minutes and seconds with the seconds rounded to the nearest whole second (hours are not wrapped at 24).
Edge cases
The checks are made in this order.
- Input checks: the capacity is greater than 0, the starting amount is 0 or more and at most the capacity, and the flow rates are 0 or more.
- Net flow positive: if the tank starts full, the result is "Already full" (0 seconds). Otherwise it is the time to fill.
- Net flow negative: if the tank starts empty, the result is "Already empty" (0 seconds). Otherwise it is the time to empty.
- Net flow 0: if the tank starts full, "Already full"; if it starts empty, "Already empty" (both 0 seconds; the amount does not change). With an amount in between, the amount never changes, so the time is not available.
Examples
| Conditions | Result |
|---|---|
| Capacity 500 L, starts empty, inflow 20 L/min | Full in 25 minutes |
| Capacity 500 L, starts full, outflow 10 L/min | Empty in 50 minutes |
| Inflow 20 L/min, outflow 5 L/min (net 15 L/min), capacity 300 L, starts empty | Full in 20 minutes |
Notes
- Flow rates are assumed constant. A draining tank usually flows more slowly as the level drops, so the real time is longer. The change in flow with the water level is not modeled.
- Overflow, evaporation, leaks and filtering are not included. This is an estimate.
- If there are several inflows or outflows, add them up and enter the total in one box.
- The time to reach an amount other than full or empty is not calculated.
- US gallons and Imperial (UK) gallons are different units. See the Volume Converter for how they relate. For a speed or a trip, use the Speed, Distance & Time Calculator.
- Use a period as the decimal separator; commas are accepted only as thousands separators (1,234.5).
Frequently asked questions
What if water flows in and out at the same time?
The calculator uses the net flow rate: the inflow minus the outflow. If it is positive, you get the time to fill; if it is negative, the time to empty.
How long does it take to empty a tank?
Set the starting amount to "Full (same as the capacity)" and enter the outflow rate (leave the inflow empty).
What if the inflow and outflow are equal?
The amount of water does not change. If the tank starts full or empty the result is 0 seconds, and if the amount is in between, the time is not available.