ForHosting KIT · Math

Cylinder diameter calculator

Find a cylinder's diameter from its volume and height. A volume of 1000 with a height of 10 gives a diameter of 11.2838 and a radius of 5.6419. Handy when a tank's capacity and the room for its height are already set. 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
1,000
Height
10
You get
Diameter
11.2838
Radius
5.6419
Pi
3.1415926536

Compute the diameter of a right circular cylinder when you know its volume and its height. Both inputs must be positive finite numbers, expressed in any consistent unit system, and the result comes back in the linear version of that same unit. You also get the radius and the exact value of pi used, so every step of the calculation is reproducible by hand or by another program.

Units and how to keep them consistent

The calculator is unit-agnostic: it performs pure arithmetic on the two numbers you supply, so correctness depends on you keeping the units consistent. If the volume is in cubic centimeters and the height in centimeters, the diameter comes out in centimeters. If the volume is in liters, convert it first — one liter is exactly 1000 cubic centimeters or 0.001 cubic meters — before pairing it with a height in those same units.

A common mistake is mixing a volume in cubic inches with a height in feet, which silently produces a meaningless number because the formula assumes one coherent length unit throughout. When in doubt, convert everything to the SI base (cubic meters and meters) or to a practical workshop pair (cubic centimeters and centimeters), run the calculation, and only then convert the resulting diameter to the display unit you prefer, such as inches or millimeters, for reporting.

Inputs, rounding and validation

The optional decimals field is an integer from 0 to 8, defaulting to 4, and it controls a single half-up rounding pass applied to the diameter and to the radius, each rounded from its own raw intermediate value rather than from another rounded field, so the two outputs stay mutually consistent. The pi field is never rounded and carries Math.PI at full double precision. Failed validations are not charged: only successful computations consume the per-call price.

Tank and container sizing

Find the diameter of a storage tank or drum when the required capacity and the available vertical height are already fixed.

Education and homework checks

Verify inverse-volume exercises: given V and h, recover the radius and diameter and confirm each algebraic step.

What inputs are required?

volume and height, both positive finite numbers in consistent units. decimals is optional, an integer from 0 to 8 defaulting to 4.

What does it output?

diameter and radius (each rounded half-up to the requested decimals), plus your volume, your height and pi at full precision.

How is the diameter worked out from volume and height?

The volume is divided by π times the height, and the square root of that gives the radius. Doubling the radius gives the diameter, so no trial and error is involved.

My volume is in liters. What do I do?

Convert it first: one liter is exactly 1000 cubic centimeters, or 0.001 cubic meters. Then pair it with a height in centimeters or meters, and the diameter comes out in that same unit.

Why does mixing units give a wrong diameter?

The formula assumes one length unit throughout. A volume in cubic inches with a height in feet silently produces a meaningless number, so convert everything to one system first and change the display unit only at the end.

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/math/cylinder-diameter

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/math/cylinder-diameter \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"volume":1000,"height":10}'
{
  "volume": 1000,
  "height": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.cylinder_diameter",
  "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.

The tool inverts the standard volume formula V = π·r²·h to recover the radius and then doubles it: diameter = 2·sqrt(volume / (π·height)).

The formula behind the tool

A right circular cylinder is a disk extruded along a straight axis, and its volume obeys V = π·r²·h, where r is the base radius and h is the perpendicular height. The tool also returns the radius, since many downstream tasks such as machining, tolerancing or pipe sizing are expressed in radial terms, and it echoes the full-precision value of pi it used so you can reproduce the intermediate arithmetic yourself and confirm the rounding step independently. Solving that equation for the radius gives r = sqrt(V/(π·h)), and doubling the radius yields the diameter d = 2·sqrt(V/(π·h)). That single closed-form expression is exactly what this calculator evaluates: no iteration, no approximation scheme, just one division, one square root and one multiplication.

Inputs, rounding and validation

Both volume and height are required numeric fields and each must be a finite number strictly greater than zero; a zero, negative, non-numeric or infinite value raises a typed invalid_input error that names the offending field, for example "volume must be a positive finite number."

Batch engineering calculations via API

Send many volume-height pairs as JSON and receive diameter and radius for each, ready for downstream CAD or procurement pipelines.

What formula does it use?

diameter = 2·sqrt(volume / (π·height)), the direct inversion of the cylinder volume formula V = π·r²·h.

What happens with zero or negative inputs?

The tool raises an invalid_input error naming the field. Failed validations are never charged.

Is it free?

Yes in the browser as a tier A widget. The deterministic API costs $0.002 per successful call; failed tasks are not charged.

Read the full KIT documentation →