Cement calculator
A 4 × 3 m slab 100 mm thick at a 1:2:4 mix needs 8 bags of cement, 400 kg in all. Enter your pour and the mix to know the whole bags to buy for a patio, shed base or path. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Length
- 4
- Width
- 3
- Thickness
- 0.1
- Mix ratio
- 1:2:4
- Wet volume m3
- 1.2
- Dry volume m3
- 1.848
- Dry factor
- 1.54
- Cement parts
- 1
This cement calculator converts a rectangular pour into the number of cement bags and the total cement weight you must buy for a site-mix concrete job. Enter length, width, and thickness in metres together with a mix ratio such as 1:2:4 (cement : sand : coarse aggregate). The engine forms the wet volume as length times width times thickness, expands it by the dry-volume factor of 1.54 to account for voids in the dry materials, then takes the cement share of that dry volume from the mix parts. Cement mass follows from a bulk density of 1440 kilograms per cubic metre; bag count is the ceiling of that mass divided by the bag weight, 50 kilograms by default. Mix parts must also be strictly positive. The work is pure deterministic arithmetic with no network calls, no sampling, and no date-dependent shortcuts.
How mix ratio turns a pour into cement bags
Site-mix concrete is specified by a volumetric ratio of cement, sand, and coarse aggregate, written cement:sand:aggregate. Common nominal mixes are 1:2:4 for ordinary slabs and paths, 1:1.5:3 for stronger floor slabs, and 1:1:2 for heavily loaded members; the first number is always the cement share. The wet volume of a rectangular pour is length times width times thickness in metres, which yields cubic metres of compacted concrete.
Dry sand and aggregate contain voids, so the loose dry volume of ingredients is larger than the wet pour: this calculator multiplies wet volume by a dry-volume factor of 1.54 unless you override it. Cement volume is then the dry volume multiplied by cement parts over the sum of the three parts. A 1:2:4 mix has seven parts in total, so cement is one seventh of the dry volume.
Bulk density of ordinary Portland cement is taken as 1440 kilograms per cubic metre, the textbook figure that also implies a 50 kilogram bag occupies about 0.0347 cubic metres. Dividing cement mass by bag weight gives an exact bag count; purchase quantities are whole bags, so the engine takes the ceiling and reports total weight as bags times bag weight. Water is not a mix-ratio part here and is not returned: water-cement ratio is a separate strength decision.
Sand and aggregate masses are also out of scope so the page can stay a cement-bag calculator rather than a full bill of quantities.
Where a cement bag calculator earns its keep
Homeowners meet this calculation when a patio, shed base, or garden path must be poured from bags of cement bought at a merchant, not from a ready-mix truck, and a wrong mix split either starves the slab of cement or leaves unopened bags in the rain. Small contractors use the same numbers to turn a footing schedule or a ground-bearing slab into a cement order before sand and aggregate are called off, then apply their own waste factor on top of the pure take-off.
Estimators embed the contract in take-off tools so a table of length, width, thickness, and mix ratio becomes bag totals without a spreadsheet full of hidden cells and mixed units. Product and education tools show learners why a cubic metre of 1:2:4 needs more than six 50 kilogram bags after the dry-volume allowance, and why a richer 1:1:2 mix jumps the cement share. This is not a premixed-concrete bag count from slab volume alone and not a mortar-bag count from brick quantity: those are different search intents with different inputs.
Pair it with volume or footing helpers when you are building a small lab of free, deterministic site calculators, and keep engineering judgement for water-cement ratio, exposure class, and reinforcement that your pour requires beyond the pure cement-bag identity.
What you can do with it
Patio and path slabs
Turn length, width, thickness, and a 1:2:4 mix into whole cement bags before you buy for a garden slab or path.
Footings and small pours
Size cement for strip footings or pad bases from rectangular dimensions and the specified site-mix ratio.
FAQ
What mix ratio should I send?
Use the volumetric cement:sand:aggregate specified for the pour. Common nominal mixes are 1:2:4, 1:1.5:3, and 1:1:2. This tool does not choose a grade for you.
Why is dry volume larger than wet volume?
Loose dry sand and aggregate contain voids. You may override the factor.
What happens if a dimension is zero or negative?
Length, width, and thickness must each be a positive number; a pour with no extent cannot consume cement.
What does the cement calculator cost?
It is free in your browser on this page.
How many bags of cement do I need for a 4 x 3 m slab?
For a slab 100 mm thick at a 1:2:4 mix you need 8 bags of 50 kg, 400 kg of cement. The slab holds 1.2 m³ of concrete, which takes 1.848 m³ of dry materials, and cement is one seventh of that.
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/build/cement \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"length":4,"width":3,"thickness":0.1,"mix_ratio":"1:2:4"}'const res = await fetch("https://api.kit.forhosting.com/build/cement", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"length": 4,
"width": 3,
"thickness": 0.1,
"mix_ratio": "1:2:4"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/build/cement",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"length": 4,
"width": 3,
"thickness": 0.1,
"mix_ratio": "1:2:4"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/build/cement", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"length":4,"width":3,"thickness":0.1,"mix_ratio":"1:2:4"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"length":4,"width":3,"thickness":0.1,"mix_ratio":"1:2:4"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/build/cement", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"length": 4,
"width": 3,
"thickness": 0.1,
"mix_ratio": "1:2:4"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "build.cement",
"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
Every dimension must be a finite positive number: zero or negative length, width, or thickness is rejected as invalid_input instead of a hollow zero. Use it free in the browser for a weekend slab, or call the API at $0.002 per successful request when estimating software needs reproducible bag counts.
How mix ratio turns a pour into cement bags
The same identity is used on site pads, in estimating notebooks, and in this API, so a four-by-three-metre slab 100 millimetres thick at 1:2:4 always produces the same bag count when the defaults stay in place.
Input contract, SI units, defaults, and error behaviour
A zero or negative dimension fails with a message that the named length, width, or thickness must be a positive number, matching the rule that a pour with no extent cannot consume cement. A mix string that is not three positive parts is rejected rather than guessed. On success the body echoes the parsed dimensions, wet and dry volumes in cubic metres, mix parts, cement volume and mass, bag weight, the exact (unrounded) bag count, the whole-bag purchase count, and total cement weight in kilograms, plus a short formula string for audit. Failed validation is not billed. POST a JSON body with four required fields. length, width, and thickness are the rectangular pour dimensions in metres and must each be a finite strictly positive number; aliases include l, length_m, w, width_m, and depth, height, t, thickness_m for thickness. mix_ratio is a string of three positive parts joined by a colon, slash, or hyphen, for example 1:2:4, 1/1.5/3, or 1-1-2, with aliases ratio, mix, and cement_sand_aggregate. Optional bag_weight_kg defaults to 50 and must be positive when sent, covering both the common 50 kilogram OPC bag and other bag masses if you convert first. Optional dry_factor defaults to 1.54, the usual voids allowance on dry volume; optional cement_density_kg_m3 defaults to 1440. Missing fields, empty strings, non-finite values, and magnitudes above the supported ceiling fail with invalid_input naming the field. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline; nothing is stored after the response returns, and the work never leaves your isolate for a model or a network hop.
Where a cement bag calculator earns its keep
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — lets you move from a phone check at the merchant to an automated pipeline without changing the mathematical result.
Integration use cases
Estimating software and fixtures
Generate deterministic bag counts and total cement weight for quotes, unit tests, and automated take-off pipelines.
Technical questions
How many cement bags do I need for a slab?
Send length, width, and thickness in metres plus mix_ratio such as 1:2:4. The API returns bags as the whole-bag ceiling of cement mass over bag weight, and total_weight_kg as bags times bag_weight_kg.