ForHosting KIT · Math

Cubic feet of a cylinder

Enter a cylinder's radius and height in feet and get its capacity in cubic feet: a radius of 2 ft and a height of 5 ft hold 62.831853 cubic feet. Made for tanks, post holes, silos and ducts measured with a tape. 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
Radius
2
Height
5
You get
Volume cubic feet
62.831853

When a tank, a pipe, a post hole or a silo is measured in feet, the capacity question that follows is almost always the same: how many cubic feet does it hold? This capability answers exactly that for a right circular cylinder. You send the radius of the base and the height, both in feet, and you get back the volume in cubic feet in a single deterministic call — no unit guessing, no manual πr²h arithmetic, no spreadsheet.

The formula behind the number

The base is a circle of radius r, whose area is πr² square feet when r is measured in feet, and multiplying by the height h in feet gives cubic feet directly. Because both inputs are in feet, the result needs no conversion factor at all — 1 cubic foot is exactly 1 ft × 1 ft × 1 ft, about 7.48 US gallons or 28.32 liters if you later need those units.

If what you measured is the diameter rather than the radius, halve it before calling; sending the diameter as the radius would overstate the volume by a factor of four, because the radius enters the formula squared. That squaring is also why small measurement errors in the radius matter twice as much as errors in the height.

Where cubic feet of a cylinder shows up

Cylindrical capacity in cubic feet is one of the most common quantities in American trades and home projects, because feet are the working unit of the jobsite. Concrete contractors compute the volume of cylindrical post holes and columns to order the right number of bags or yards of mix; a cubic yard is 27 cubic feet, so this single number is the bridge between a tape measure and a purchase order.

Well and tank sizing, water heater capacity, ductwork and HVAC runs, grain silos, propane cylinders, aquariums and pond features all reduce to πr²h once you have a tape on the radius and the height.

Order concrete for post holes

Get the cubic feet of a cylindrical hole or column from its radius and depth, then divide by 27 for the cubic yards to order.

Size tanks and silos

Compute the capacity in cubic feet of a cylindrical water tank, well casing or grain silo from two tape-measure readings.

Estimate pipe and duct volume

Treat a pipe run as a long thin cylinder to get the volume of air, water or insulation it contains in cubic feet.

Which units does it use?

Both the radius and the height are in feet, so the result is directly in cubic feet with no conversion factor.

I measured the diameter, not the radius. What do I send?

Divide the diameter by two first. The formula is πr²h, and sending the diameter as the radius would give four times the true volume.

Can I control the precision?

Yes. The optional decimals field sets the decimal places of the volume, from 0 to 12, with six as the default. Rounding is half-up.

Is my input stored anywhere?

No. The computation is a pure function: the radius and height are processed in memory and discarded, and only the volume is returned.

How many gallons or liters are in a cubic foot?

One cubic foot is about 7.48 US gallons, or 28.32 liters. Multiply the cubic feet result by those figures when a tank, water heater or pond is rated in gallons or liters.

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/cubic-feet-cylinder

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/cubic-feet-cylinder \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"radius":2,"height":5}'
{
  "radius": 2,
  "height": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.cubic_feet_cylinder",
  "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.

Both inputs are validated as positive finite numbers before any math happens, and anything else is rejected with a typed invalid_input error that names the offending field, so bad data never turns into a silently wrong capacity figure.

The formula behind the number

A right circular cylinder is a circle extruded along a straight axis, so its volume is simply the area of the base times the height: V = πr²h. This endpoint applies that closed formula exactly as written: nothing is approximated except the mathematical constant π itself, which JavaScript carries to double precision.

Validation, precision and rounding

The two inputs are checked before any arithmetic: both radius and height must be positive finite numbers. Once the inputs pass, the volume is computed in double precision and rounded to the requested number of decimal places — six by default, anywhere from zero to twelve via the optional <em>decimals</em> field — using a half-up rule applied to the absolute value. Zero, a negative value, a missing field, an unparseable string, NaN or infinity are all rejected with a typed <em>invalid_input</em> error whose message names the field at fault — an error that is never billed, because it is the caller's data that failed, not the service. Numeric strings such as "2.5" are accepted and coerced, which makes the endpoint friendly to form data and query parameters. The response echoes the exact radius and height that were used, so a single payload is a complete record of what was computed.

Where cubic feet of a cylinder shows up

The capability runs as a pure function on our global edge: nothing is stored, nothing is sent to any third party, and the same code that answers paid API calls runs free in your browser on this page, so you can sanity-check a measurement interactively before automating anything. At $0.002 per request with no per-unit component, a batch job that sweeps thousands of candidate dimensions — for example sizing a tank against a capacity target — costs exactly what the catalog says, with no surprises.

What does it cost?

$0.002 per request, with no per-unit component. It is also free to run in your browser on this page.

What input is rejected?

Anything that is not a positive finite number: zero, negative values, non-numeric strings, NaN, infinity and missing fields all return a typed invalid_input error.

Read the full KIT documentation →