ForHosting KIT · Home, food & hobbies

Pipe water volume calculator

A 20 m run of 50 mm pipe holds about thirty-nine litres, roughly 10 US gallons. Enter the inside diameter and the length in one unit to know how much water you will flush, fill or treat. 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
Inside diameter
50 mm
Length
20,000
You get
Inside diameter m
0.05 mm
Length m
20
Radius m
0.025
Cross section m2
0.0019634954

A pipe water volume calculator answers a practical plumbing question: how much water sits inside a straight run of circular pipe given the inside diameter and the length of that run. Homeowners, plumbers, and facility techs use that volume when flushing a new line, pre-filling a closed loop, dosing treatment chemical by system capacity, or estimating how long a hose will take to fill a known section. Enter a positive inside diameter and a positive length in the same unit—millimetres by default, or centimetres, metres, inches, or feet—and the tool converts both to metres, applies the cylinder formula V equals pi times radius squared times length, and returns cubic metres, litres, US liquid gallons, and millilitres.

What pipe water volume means and the cylinder formula

A straight circular pipe filled end to end is a right circular cylinder whose cross-section is the bore, not the outer shell. Water volume therefore depends only on the inside diameter D and the axial length L of the filled segment: radius is D divided by two, cross-sectional area is pi times radius squared, and volume is that area times L. Outer diameter, wall schedule, and material never enter the water capacity—those matter for structural strength and friction loss, but not for how many litres sit inside a filled run.

This calculator exists for the search intent around pipe water volume for flushing, filling, and sizing: people who already know the bore and the length and need a consumer liquid unit, not a steel take-off that also returns wall material. Optional unit selects mm, cm, m, in, or ft for both fields together; the default is millimetres because pipe IDs on schedules and product labels are often printed that way.

Field use for flushing, filling, and line sizing

Flushing a new copper, PEX, or PVC branch after install often means pushing several pipe volumes of clean water until debris and flux residue clear; knowing the held volume turns a vague “flush for a few minutes” into a measured multiple of system capacity. Closed hydronic loops and solar thermal collectors are pre-filled and bled by volume so chemical inhibitor is dosed against real water mass rather than an optimistic nameplate.

Irrigation mainlines and long garden hose runs can be sized for fill time when you combine this volume with a known flow rate from a hose bib or pump curve. Facility teams mapping dead legs in domestic cold-water systems use inside diameter and measured length to estimate stagnant volume that needs periodic purge for water-quality policy. Teachers and trade-school labs generate worksheets from integer millimetre bores and metre lengths so students practice unit conversion and the pi r squared L identity without inventing material wall volume.

Prefer measuring or reading the true inside diameter; nominal pipe size is not always the bore, and using outer diameter understates wall thickness and overstates water capacity. This landing targets people searching for a pipe water volume calculator, water in a pipe by diameter and length, or flush-and-fill litres and gallons online; it is not a hollow-pipe material take-off that needs outer radius, not a tank fill-depth tool, and not a flow-rate or Reynolds-number calculator.

Prefer this capability when the question is only how much water a filled circular run holds; if you need steel or plastic wall volume from inner and outer radius, use a geometry pipe-volume tool instead.

Flush volume for new plumbing runs

Plumbers enter inside diameter and measured branch length to get litres or US gallons so a new line is flushed for a known multiple of held volume.

Closed-loop fill and chemical dosing

HVAC and solar installers convert bore and loop length into system water volume before adding inhibitor or glycol at the correct concentration.

How is pipe water volume calculated?

Treat the filled bore as a cylinder: V = π · (D/2)² · L after converting inside diameter D and length L to metres. Results are returned in m³, litres, US gallons and millilitres.

What units can I use for diameter and length?

Convert mixed notes to a single unit before calling.

Do I enter inside or outside diameter?

Use inside (bore) diameter. Outside diameter includes wall thickness and overstates water capacity if used by mistake.

What does the pipe water volume calculator cost?

It is free in your browser on this page.

What if diameter or length is zero or negative?

Both dimensions must be strictly positive finite numbers.

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/home/pipe-water-volume

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/home/pipe-water-volume \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inside_diameter":50,"length":20000}'
{
  "inside_diameter": 50,
  "length": 20000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "home.pipe_water_volume",
  "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.

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.

Non-positive dimensions fail with invalid_input instead of inventing capacity. Through the API a successful request costs $0.002; validation failures are not charged.

What pipe water volume means and the cylinder formula

Preferred inputs are the scalars inside_diameter and length as JSON numbers, with aliases diameter, id, d, di, bore, and inside_d for the bore, and L, pipe_length, run_length, and h for the length. After conversion to metres the engine reports inside_diameter_m, length_m, radius_m, cross_section_m2, volume_m3, volume_liters, volume_us_gallons, volume_ml, the formula string V equals pi times open parenthesis D over two close parenthesis squared times L, and a short message. Missing fields, non-finite values, zero or negative dimensions, and unknown unit strings raise invalid_input with a message that names the failing constraint so scripts and forms can surface a clear fix instead of a silent NaN.

How to call the API and read the response

Example: fifty millimetre inside diameter and twenty metres of run convert to zero point zero five metres bore and twenty metres length, radius zero point zero two five metres, cross section about zero point zero zero one nine six three five square metres, and volume about zero point zero three nine two seven cubic metres, which is about thirty-nine point two seven litres or roughly ten point three eight US gallons. POST a JSON body with required inside_diameter and length, both strictly greater than zero and finite, plus optional unit defaulting to mm. Use the same length unit for diameter and length in one request; if your notes mix feet of run with millimetres of bore, convert one side before calling rather than mixing units in a single payload. On success the response echoes inside_diameter, length, and unit, then publishes SI intermediates and liquid volumes: cubic metres for engineering ledgers, litres for metric site work, US liquid gallons for North American flush and fill estimates, and millilitres for small-diameter sample lines and laboratory dosing. Failed validation—blank diameter, zero length, a negative bore, Infinity, or unit equal to yard—returns invalid_input and is never billed. Pricing is a flat $0.002 per successful item. Pair the call with your own pump or hose flow rate if you need fill time; this endpoint returns static held volume only, not flow or pressure drop.

Field use for flushing, filling, and line sizing

Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory sizing scripts cheap when operators trial impossible zeros while learning the contract.

Homework and estimating app fixtures

Teachers and developers generate known-good cylinder water volumes plus deliberate non-positive dimension rejections for worksheets and automated tests.

Read the full KIT documentation →