ForHosting KIT · Science

Hydraulic detention time calculator

Work out how long liquid stays in a tank: 100 m³ fed at 10 m³ per hour gives a detention time of 10 hours, and 500 litres at 25 litres per minute gives 20 minutes. The time unit follows the flow unit. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Volume
100
Flow rate
10
You get
Detention time
10
Precision
10

This hydraulic detention time calculator finds how long fluid remains in a tank from the tank volume and the volumetric flow rate. Detention time, also called hydraulic retention time or HRT, is defined by τ equals V divided by Q, where V is the working volume of the basin, clarifier, or reactor and Q is the volumetric flow through it under steady conditions. The same definition appears in wastewater treatment, chemical process tanks, and environmental engineering whenever a protocol asks for hours of detention from cubic metres and cubic metres per hour, or minutes from litres and litres per minute. Enter volume and flow rate in any consistent pair of units; the engine returns the detention time in the corresponding time unit together with a formula tag and a unit note. Classic checks include one hundred cubic metres at ten cubic metres per hour yielding ten hours, and five hundred litres at twenty-five litres per minute yielding twenty minutes. The path is pure deterministic arithmetic with no network, randomness, or date-dependent shortcuts.

What hydraulic detention time means

Hydraulic detention time is the mean time a fluid parcel spends inside a tank under the ideal volume-over-flow model used in environmental and chemical engineering. The defining relation is τ equals V divided by Q: divide the working volume of the vessel by the volumetric flow rate that fills or empties it in steady operation.

Working volume is the liquid inventory that actually participates in storage, not the empty-shell geometric capacity if unused freeboard sits above the waterline, and flow rate is a volumetric discharge, not a mass flow, so that V and Q share the same volume unit. When V is in cubic metres and Q is in cubic metres per hour, τ is in hours; when V is in litres and Q is in litres per minute, τ is in minutes.

The same ratio is called hydraulic retention time in wastewater literature, space time in reactor design, and mean residence time in a perfectly mixed tank of constant volume.

Where detention time fits in plant design, study, and software

Operators meet τ equals V over Q when sizing a clarifier, checking whether a chlorine contact tank meets a required contact time, or confirming that a mixing basin still holds the design hours after a flow increase. Students meet the same ratio in environmental engineering homework that gives a basin volume in cubic metres and an influent flow in cubic metres per day and asks for detention time in hours, or in chemical engineering notes that introduce space time as reactor volume over volumetric feed.

Teachers can pre-generate answer keys for lab manuals without trusting opaque apps that mix millilitres with cubic metres or silently report minutes when the statement asked for hours. Process engineers use the definition when a permit or SOP states a minimum hydraulic detention time: divide the working volume by the current flow and compare against the limit before changing pumps or weirs.

Developers call the same contract from scripts to seed deterministic test vectors for treatment-plant tutors, to normalize user-entered tank parameters before a design notebook export, or to satisfy programming-challenge statements that demand τ rather than a hand-waved sketch.

Clarifier and contact-tank checks

Compute hydraulic detention time τ = V/Q from working volume and current flow before comparing against a design or permit hold-up.

Homework and lab keys

Grade environmental-engineering worksheets that ask for hours of detention from cubic metres and cubic metres per hour with a deterministic oracle.

What happens if the flow rate is zero or negative?

Detention time τ = V/Q is undefined at zero flow and non-physical for a negative discharge, so those requests are not billed.

Is detention time the same as hydraulic retention time (HRT)?

Yes for this calculator. Hydraulic detention time, hydraulic retention time, and ideal space time are the same ratio τ = V/Q under steady volumetric flow through a tank of working volume V.

What units does the detention time calculator use?

Any consistent pair: m³ with m³/h yields hours, L with L/min yields minutes. The engine does not convert units; mixed volume units would give a wrong time.

Does it account for dead zones or short-circuiting in the tank?

No. It uses the ideal model, working volume divided by flow, with no correction for dead zones, short-circuiting or tracer results. For a residence time measured with a tracer, you need a different method.

Should I enter the tank's full volume or its working volume?

The working volume, meaning the liquid that actually sits in the tank. Empty freeboard above the waterline does not count, and the flow must be a volume per time, not a mass flow.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/chem/detention-time

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/chem/detention-time \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"volume":100,"flow_rate":10}'
{
  "volume": 100,
  "flow_rate": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.detention_time",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs_value1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What hydraulic detention time means and what the response contains

This calculator returns the supplied volume and flow_rate as normalized numbers, the computed detention_time, a method tag detention_time, the rounding precision, a formula string restating τ equals V over Q, and a unit_note that volume and flow must use consistent units so the time unit is implied by Q. There is no unit conversion between cubic metres and litres, no correction for dead zones, short-circuiting, or tracer variance, and no kinetic conversion from detention time to removal efficiency: the engine either evaluates the closed-form ratio inside the supported numeric range or rejects the input with invalid_input. Rejected cases include a missing volume or flow_rate, non-finite values, magnitudes above the documented ceiling, a volume that is zero or negative, and any flow_rate that is not a positive number, because division by a non-positive flow is undefined or non-physical for hydraulic detention of a tank. If you need tracer-based mean residence time, CSTR conversion from rate constants, or tank volume from geometry, use those dedicated tools; this page answers only τ from V and Q with stable numeric output suitable for worksheets, plant checks, and API consumers that must not invent hydraulic models.

How volume and flow rate are read and how results stay reproducible

Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces and non-numeric tokens are rejected. The preferred field for working tank volume is volume, but aliases V, v, tank_volume, tank, vol, and working_volume are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. The preferred field for volumetric discharge is flow_rate, with aliases Q, q, flow, volumetric_flow, discharge, and volumetric_flow_rate. Volume must be a finite positive number; zero or negative volume fails with invalid_input and a message that names the field so a bad cell does not become a silent zero or a negative time. Flow rate must be a finite positive number: zero flow would make τ equals V over Q undefined (infinite hold-up with no throughput), and a negative flow is not a physical discharge for this model, so those cases fail with invalid_input and are not billed. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the hydraulic detention time formula yourself.

Where detention time fits in plant design, study, and software

Product and education tools use the endpoint when a learner types volume and flow rate and the interface must show detention time with a clear unit note. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with dilution or reactor-kinetics helpers when you need related process quantities, and with other science endpoints when you are building a small lab of free, deterministic chemistry calculators.

Deterministic plant-model fixtures

Generate reproducible detention_time values for unit tests, treatment-plant tutors, and CI assertions on τ = V/Q.

How do I calculate hydraulic detention time from volume and flow rate?

Send finite positive numbers volume (V) and flow_rate (Q) in the same volume unit. The API returns detention_time τ = V/Q in the time unit implied by Q (hours if Q is volume per hour).

What does the detention time calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →