Height of a cone calculator
A cone holding about 37.7 with a base radius of 3 stands 4 tall: enter the volume and the radius to get the perpendicular height of a right circular cone, the reverse of a cone volume calculator. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Volume
- 37.6991118431
- Radius
- 3
- Height
- 4
from volume and base radius
Input validation and error behavior
Strict validation is what makes this calculator safe to put in an automated pipeline. The radius check matters most, because a zero radius would make the formula divide by zero and a negative radius is geometrically meaningless even though squaring it would hide the sign; both are rejected before any arithmetic happens. Numeric strings such as "37.7" are accepted and coerced, which keeps URL query parameters and form posts ergonomic, but empty strings, booleans, arrays, and objects are not numbers and are refused.
The optional precision is clamped to the inclusive range zero through fifteen before rounding, so an out-of-range preference degrades gracefully instead of failing. This fail-fast contract means the response you cache is always a real height, never a NaN that poisons downstream sums, averages, or chart series.
Where a height-from-volume lookup earns its keep
The inverse direction is the one real workflows ask for. Silo and hopper design starts from a required capacity and a floor footprint, and the question is how tall the conical discharge section must be; packaging teams know the volume a conical sleeve must hold and the cup rim radius, and need the sleeve length; a conical stockpile of gravel or grain is surveyed by volume, and its height is the check against drone imagery.
In education, giving students volume and radius and asking for height forces genuine algebraic rearrangement rather than button-pressing, and this tool is the answer key that shows the formula alongside the number. Precision choice has practical weight too: two or three decimals suit workshop drawings in millimetres, while the default ten decimals keep double-precision fidelity for scientific code.
FAQ
What happens if the radius is zero or negative?
Zero would divide by zero and a negative radius is geometrically meaningless; rejected requests are not charged.
Can I pass the values as strings?
Yes, numeric strings like "37.7" are coerced to numbers.
What formula does it use?
It rearranges the cone volume formula: the height is three times the volume divided by pi times the radius squared. A cone of about 37.7 in volume with a radius of 3 therefore stands 4 tall.
Why does a small error in the radius matter so much?
Because the height depends on the square of the radius. Underestimating the radius by one percent inflates the computed height by roughly two percent, so it pays to measure the radius carefully.
How many decimals does the height have?
Ten by default, and you can choose anything from zero to fifteen; a choice outside that range is brought back inside it instead of failing. Two or three decimals suit workshop drawings in millimetres.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/height-of-cone \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"volume":37.69911184307752,"radius":3}'const res = await fetch("https://api.kit.forhosting.com/math/height-of-cone", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"volume": 37.69911184307752,
"radius": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/height-of-cone",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"volume": 37.69911184307752,
"radius": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/height-of-cone", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"volume":37.69911184307752,"radius":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"volume":37.69911184307752,"radius":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/height-of-cone", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"volume": 37.69911184307752,
"radius": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.height_of_cone",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This calculator inverts the classic right circular cone volume formula to give you the perpendicular height directly: enter a positive volume and a positive base radius, and the engine returns height as three times the volume divided by pi times the radius squared, h = 3V/(pi r^2). It is the companion operation to a cone volume calculator, built for the cases where the container, funnel, or pile is already sized by capacity and what you actually need is how tall it stands. Inputs are validated strictly: a missing, non-numeric, non-finite, zero, or negative volume or radius returns invalid_input instead of a silent NaN, and validation failures are never charged. The response echoes volume and radius, reports the height rounded to your chosen precision, and includes the formula string so a student or a log line can verify the identity without reading the source. Through the API a successful request costs $0.002.
From volume to height: inverting the cone formula
A right circular cone holds exactly one third of the cylinder that shares its base and height, which is why its volume reads V = (1/3) * pi * r^2 * h. Because the height depends on the square of the radius, small radius errors dominate: a one percent underestimate of r inflates the computed height by roughly two percent, which is worth remembering when your radius comes from a diameter measured with calipers. Solving that identity for the height is a single algebraic step: multiply both sides by three and divide by the base area pi * r^2, giving h = 3V / (pi * r^2). This tool performs that inversion for you, deterministically, every time. Preferred inputs are the scalars volume and radius as JSON numbers; aliases v and V for the volume and r, R, or base_radius for the radius are accepted so forms and spreadsheet exports plug in without a remapping layer. The response always echoes the volume and radius it used, reports height rounded to that precision, and carries the formula string h = 3V / (pi * r^2) so the derivation is auditable at a glance.
Input validation and error behavior
The volume must be a finite number greater than zero: a missing volume, a string that does not parse, an infinite value, zero, or a negative capacity all raise invalid_input with a message that names the failing field, and the same discipline applies to the base radius. Errors are reported through the standard error envelope with code invalid_input and a human-readable message, and rejected requests are not charged, so a retry loop with a bad payload burns no budget.
Integration use cases
Technical questions
What formula does the height of a cone calculator use?
It inverts V = (1/3) * pi * r^2 * h into h = 3V / (pi * r^2): three times the volume divided by the base area pi times the radius squared.
How do I control decimal places in the result?
Use the optional precision parameter (aliases decimals, dp) with an integer from 0 to 15; the default is 10 decimal places.
How much does an API call cost?
A successful request costs $0.002. Requests that fail input validation return invalid_input and are never charged.