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.

Result —

Details
Net flow rate (inflow − outflow)—
Total minutes—

This is an estimate that assumes constant flow rates. The outflow usually slows as the water level drops, and pumps, valves and pipes change the real flow. Overflow, evaporation, leaks and filtering are not included.

How it is calculated

Net flow rate = inflow rate − outflow rate (the rates are assumed to be constant).

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.

  1. 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.
  2. Net flow positive: if the tank starts full, the result is "Already full" (0 seconds). Otherwise it is the time to fill.
  3. Net flow negative: if the tank starts empty, the result is "Already empty" (0 seconds). Otherwise it is the time to empty.
  4. 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

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.