Cube volume calculator
Enter the side of a cube and get its volume, the side multiplied by itself three times: a side of 3 gives 27, in your unit cubed. Useful for shipping cartons, aquariums, storage boxes and concrete blocks. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Side
- 3
- Volume
- 27
A cube is the simplest three-dimensional solid there is — every edge equal, every face a square — yet its volume shows up constantly: storage boxes, dice, shipping cartons, aquarium tanks, concrete blocks. Send a single positive number and get back the exact cubic result, in whatever unit you supplied, cubed.
One formula, one input
The volume of a cube is the side length multiplied by itself three times: V = a³. That is the entire computation, and this capability deliberately keeps it that way. The unit is entirely yours.
If you send metres, the answer is in cubic metres; if you send inches, the answer is in cubic inches; if you send centimetres, the answer is in cubic centimetres. Nothing is converted behind your back, which makes the result trivial to plug into a larger pipeline: compute the cube volume here, then convert units with a converter capability if you need litres or gallons.
How the result is computed
The rounding step exists for one reason: reproducibility. Floating-point arithmetic can produce slightly different trailing digits on different machines, and a capability whose output is compared byte to byte cannot afford that. Rounding to six decimals makes the answer stable everywhere while keeping far more precision than any real-world measurement carries.
Numeric strings are accepted as a convenience, so sending "2.5" behaves exactly like sending 2.5. The computation is fully deterministic: there is no network access, no randomness, no clock, and no state carried between requests. The same input always produces the same output, whether the code runs on our edge servers or free in your own browser.
Where cube volume is used
Cube volume appears in more places than the name suggests. Logistics teams use it to estimate the capacity of cubic cartons and to sanity-check dimensional-weight charges. Makers and woodworkers compute the internal volume of boxes and enclosures before cutting material.
Teachers and students use it as the first volume formula in geometry, and checking homework against a calculator avoids transcription mistakes. Aquarium and terrarium keepers use it to estimate water capacity, which drives dosing decisions for treatments and conditioners. In construction, cubic blocks and pads are a recurring shape, and a quick a³ is the fastest way to estimate concrete or fill.
Through the free on-page calculator, you can get a single answer instantly, with no account and no code.
What you can do with it
Estimate shipping carton capacity
Compute the cubic volume of a square carton from its side to check whether a product fits or what the dimensional weight will be based on.
Check geometry homework
Verify V = a³ exercises instantly — the student computes by hand, then compares against an exact, deterministic answer.
Size an aquarium or tank
Get the internal cubic volume of a cube-shaped tank to plan water changes, dosing and equipment capacity.
FAQ
What input does it accept?
A single field, side, holding the edge length of the cube.
What unit is the result in?
The same unit you supplied, cubed. Send metres and you get cubic metres; send inches and you get cubic inches. No unit conversion is applied.
How accurate is the result?
The volume is computed exactly and rounded to six decimal places so the output is identical on every machine — far more precision than any physical measurement carries.
How do I get litres or gallons from a cube's volume?
The result is in the cube of the unit you entered, such as cubic centimetres or cubic inches, and nothing is converted for you. For litres or gallons, run the result through a unit converter afterwards.
How do I estimate how much water a cubic tank holds?
Measure the inside side of the tank and enter it: the volume is its water capacity in that unit cubed. Aquarium and terrarium keepers use this figure to dose treatments and conditioners.
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/cube-volume \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"side":3}'const res = await fetch("https://api.kit.forhosting.com/math/cube-volume", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"side": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/cube-volume",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"side": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/cube-volume", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"side":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"side":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/cube-volume", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"side": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.cube_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.
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
The cube volume API takes the side length of a cube and returns its volume, computed as the side cubed. The same deterministic code runs free in your browser on this page and costs $0.002 per request when you automate it through the API.
One formula, one input
You pass one field, side (the aliases a, edge and length are also accepted), and you receive a clean JSON object with the side you sent, the resulting volume and the formula used. The side must be a positive finite number: zero, negative values, infinities and non-numeric input are rejected with a clear invalid_input error instead of a misleading result.
Where cube volume is used
Through the API at $0.002 per request, you can fold this into a quoting tool, an inventory system or an automated checker without writing or maintaining the formula yourself.
Technical questions
What does it cost?
$0.002 per request via the API. It is also free to run in your browser on this page.
What happens with zero, negative or non-numeric input?
The request is rejected with an invalid_input error. A cube needs a positive, finite side length, and the API says so instead of returning a misleading number.