How these calculators work
Every number these tools produce can be reproduced by hand from the values you typed. This page sets out the formulae, the conversions, the bounds and the rounding, and separates arithmetic from the guidance we attribute to a published source.
Every formula this site uses
Nothing here is proprietary and nothing is hidden. Each formula below is the one the shipped code runs; the table is generated from the same registry the calculators import, so the page cannot drift away from the engine.
| Step | Formula | Note |
|---|---|---|
| Feet to metres | 1 ft = 0.3048 m | Exact by definition. Feet are converted on entry; there is no imperial output anywhere. |
| Depth to metres | depth m = mm ÷ 1000, or cm ÷ 100, or m × 1 | Depth is entered in millimetres, centimetres or metres and converted before any multiplication. |
| Cubic metres to litres | 1 m³ = 1000 L | The only volume conversion used. |
| Rectangle area | A = length × width | Each dimension carries its own unit selector. |
| Circle area | A = π × r², with r = d ÷ 2 when a diameter is entered | Math.PI is used at full precision, never a truncated constant. |
| Triangle area | A = base × perpendicular height ÷ 2 | The height is the perpendicular height, not the length of a sloping side. |
| Measured area | A = the area you entered, in m² | Square metres only, so no unit can be misread. |
| Net area | net area = sum of added areas − sum of subtracted areas | A net area of zero or less produces no result at all. |
| Net volume | net volume m³ = net area m² × depth m | The single volume step every material calculator shares. |
| Gross volume after overage | gross volume = net volume × (1 + overage % ÷ 100) | Overage is your figure. Left blank, no allowance is added and the result says so. |
| Bag count | bags = ceiling(gross litres ÷ bag litres) | Bag size is yours. Counts round up to whole units. |
| Bulk bag count | bulk bags = ceiling(gross m³ ÷ bulk bag m³) | Bulk bag volume varies between suppliers, so it is an input rather than a constant. |
| Mass from a density you entered | kg = gross m³ × density kg/m³, and tonnes = kg ÷ 1000 | Only ever shown when you enter a density. No calculator assumes one. |
| Zone volume | zone volume m³ = zone area m² × that zone’s depth m | Each zone owns its own depth, then the zones are added. |
| Soil and improver blend split | improver m³ = gross m³ × blend % ÷ 100, and soil m³ = gross m³ − improver m³ | The two lines sum to the gross total. The split makes no claim about soil quality. |
| Gross turf area after waste | gross area = net area × (1 + waste % ÷ 100) | The waste allowance covers cuts and shaping. It is your figure, not a published rule. |
| Area of one roll | roll area m² = roll width m × roll length m, or the m² per roll you enter | Roll size varies between suppliers, so it is always visible and editable. |
| Roll count | rolls = ceiling(gross area ÷ roll area) | Rounded up, because part of a roll still has to be bought. |
| Turf cost | cost = rolls × price per roll | Only shown when you enter a price. Excludes delivery. |
| Topsoil underlay volume | underlay volume m³ = net area m² × underlay depth m | Net area, not gross: soil goes under the lawn, not under the offcuts. |
| Compost by weight rate | total kg = net area m² × rate kg/m² | Rate mode emits no litre value. The two compost modes never convert into one another. |
| Pack count by weight | packs = ceiling(total kg ÷ pack kg) | Pack weight is yours, taken from the bag you are actually buying. |
| Low spot fill volume | spot volume m³ = spot area m² × average fill depth m | Each spot is calculated independently and then added. |
| Cut volume | cut volume m³ = cut area m² × average cut depth m | Reported separately from fill and never netted against it. |
Unit conversions
- 1 ft = 0.3048 m, exact by definition.
- 1 mm = 0.001 m and 1 cm = 0.01 m.
- 1 m³ = 1000 L.
All internal arithmetic is in metres, square metres, cubic metres and kilograms. Feet, millimetres and centimetres are converted on entry and echoed in the result exactly as they were typed, so the record shows what you actually entered. There is no imperial output anywhere.
How numbers are read
One parser handles every numeric field, and it is deliberately strict, because a silently misread number is worse than a rejected one.
- A decimal comma and a decimal point are equivalent: 2,5 and 2.5 both mean two and a half.
- Spaces are stripped, including non-breaking and thin spaces, so 1 250 pasted from a spreadsheet reads as 1250.
- A value containing both a comma and a full stop is rejected rather than guessed at. Interpreting 1,234.5 wrongly is a tenfold error, and there is no way to tell grouping from decimals with certainty.
- The same separator twice is rejected, as are exponent forms, hexadecimal, units inside the field, and anything that is not a single plain decimal number: 1e3, 5 m and 2..5 all fail with a message naming the field.
- Full double precision is kept. Nothing is rounded before display.
Validation bounds
Bounds are broad on purpose. They exist to catch typing slips and to keep the arithmetic finite, not to express what is horticulturally sensible — that is the job of the copy, not of a rejection. Every intermediate product is also checked against a ceiling of 1e+12 , which closes the gap where two individually plausible values multiply into something meaningless.
| Field | Minimum | Maximum | Unit |
|---|---|---|---|
| Any single length, after conversion | above 0 | 1000 | m |
| Circle radius, after conversion | above 0 | 500 | m |
| An area entered directly | above 0 | 100000 | m² |
| Net total area, after subtractions | above 0 | 100000 | m² |
| Depth, after conversion | above 0 | 2 | m |
| Overage | 0 | 50 | % |
| Waste allowance | 0 | 50 | % |
| Improver blend | 0 | 50 | % |
| Bag size | above 0 | 1000 | L |
| Bulk bag size | above 0 | 10 | m³ |
| Pack weight | above 0 | 1000 | kg |
| Density | 200 | 2500 | kg/m³ |
| Application rate | above 0 | 100 | kg/m² |
| Roll width, after conversion | above 0 | 5 | m |
| Roll length, after conversion | above 0 | 50 | m |
| Area per roll | above 0 | 50 | m² |
| Price per roll | 0 | 1000 | £ |
| Number of sections | 1 | 20 | rows |
| Any volume | above 0 | 200000 | m³ |
| Any count of bags, bulk bags or rolls | 0 | 10000000 | units |
Density is the only field with a non-zero minimum. It is there because a mistyped density is the single input that can turn a plausible volume into a wildly wrong tonnage on a delivery order, and the rejection message says so.
Rounding and display
Full precision runs through every calculation and rounding happens once, at the point of
display. Rounding is half-up on the magnitude, with a precision correction so that 1.005 at two
decimal places is 1.01 — plain toFixed gives 1.00 in IEEE-754 arithmetic, and a
rounding rule that surprises the person checking it is a broken rule.
| Quantity | Rule | Example |
|---|---|---|
| Area, m² | 2 decimal places | 62.00 m² |
| Volume, m³, 1 and above | 2 decimal places | 5.25 m³ |
| Volume, m³, 0.01 to 1 | 3 decimal places | 0.600 m³ |
| Volume, m³, below 0.01 | 4 decimal places | 0.0045 m³ |
| Litres, 1 and above | whole litres, thousands separated | 5,250 L |
| Litres, below 1 | 1 decimal place | 0.4 L |
| Kilograms | 1 decimal place | 6,300.0 kg |
| Tonnes | 2 decimal places | 6.30 t |
| Counts | whole units, rounded up | 88 |
| Percentages | as entered | 5 % |
| Cost | 2 decimal places | £212.00 |
Bag, bulk-bag and roll counts always round up, because part of a bag still has to be bought. The rounding-up step first snaps a value to the nearest whole number if it is within a billionth of it, so a floating-point artefact such as 53.000000000000007 is 53 rather than 54, while a genuine 52.5 is still 53.
Where a result is split into components — a blend, a cut and a fill, a per-section list — the components are rounded for display and may differ from the total by a small amount. The card says so rather than quietly adjusting a component to make the sum look tidy.
Three kinds of number
Every figure on this site is exactly one of these, and the interface labels it as such.
| Class | What it is | Examples |
|---|---|---|
| Transparent arithmetic | Derivable by hand from your inputs. Needs no authority. | Area, volume, litres, gross after overage, bag counts, roll counts, cost, mass from a density you entered |
| Your planning assumption | A value you own. It changes the answer, so it is never filled in silently. | Depth, overage, waste, bag size, bulk bag size, pack weight, density, roll size, rate, blend, price per roll |
| Source-backed guidance | A published figure or practice, cited and dated, offered as an editable starting point. | Mulch depth of at least 5 cm and ideally 7.5 cm; 5–10 kg/m² of organic matter; about 50 L/m² at 5 cm; cultivation to 20–25 cm; September or October for key autumn tasks; fork holes 10–15 cm apart; aerating every two to three years; a 610 mm × 1640 mm turf roll |
A cited figure never becomes your assumption silently. Applying a preset records which source gave the number; editing the field drops that attribution, and the result then describes it as your value.
Golden vectors
These are the worked cases the test suite runs on every build. The table is generated from the same fixture module the tests import, so a published expectation and a tested expectation cannot disagree.
Geometry
| Ref | Input | Expected |
|---|---|---|
| G1 | Rectangle 10 m × 5 m | net area 50 m² |
| G2 | Rectangle 10 m × 5 m plus rectangle 4 m × 3 m | net area 62 m² |
| G3 | Circle, radius 3 m | net area 28.274333882308138 m² |
| G4 | Circle, diameter 0.8 m | net area 0.5026548245743669 m² |
| G5 | Triangle, base 6 m, height 4 m | net area 12 m² |
| G6 | Rectangle 20 ft × 10 ft | net area 18.580608 m² |
| G7 | Rectangle 10 m × 5 m, subtract circle radius 1 m | net area 46.86 m² (50 − π at full precision) |
| G8 | Measured area entered as 2,5 | net area 2.5 m² |
| G9 | Rectangle 10 m × 5 m, subtract measured area 50 | fails closed: net area not positive |
| G10 | Rectangle 1001 m × 1 m | fails closed: length above maximum |
Volume and material chain
| Ref | Input | Expected |
|---|---|---|
| V1 | 50 m² at 100 mm, no overage | 5 m³ and 5,000 L |
| V2 | V1 with 5% overage | gross 5.25 m³ and 5,250 L |
| V3 | V2 with 60 L bags | 88 bags |
| V4 | V2 with 0.6 m³ bulk bags | 9 bulk bags |
| V5 | V2 with density 1200 kg/m³ | 6,300 kg and 6.30 t |
| V6 | V1 with no density | no mass shown at all |
| V7 | 100 m² at 50 mm | 5 m³ and 5,000 L |
| V8 | 100 m² at 80 mm | 8 m³ — 60% more than 50 mm, by our arithmetic |
| V9 | 20 m² at depth 2,5 cm | 0.500 m³ and 500 L |
| V10 | 40 m² at 15 mm | 0.600 m³ and 600 L |
| V11 | Depth 0 | fails closed: depth must be greater than 0 |
| V12 | Depth left blank | fails closed: depth missing |
| V13 | Bag size 0 | fails closed: whole result withheld |
| V14 | Density 50 kg/m³ | fails closed: below the 200–2500 band |
| V15 | Density 9999 kg/m³ | fails closed: above the 200–2500 band |
| V16 | Overage −5% | fails closed: below minimum |
| V17 | Overage 120% | fails closed: above maximum |
| V18 | 100,000 m² at 2 m with density 2500 | 500,000,000 kg — in bounds, no overflow |
| V19 | Depth 1e400 | fails closed: exponent form rejected by the parser |
| V20 | 100,000 m² at 2.1 m | fails closed: depth above maximum |
Turf
| Ref | Input | Expected |
|---|---|---|
| T1 | 50 m², 5% waste, 1 m² rolls | gross 52.5 m² and 53 rolls |
| T2 | 50 m², 0% waste, 1 m² rolls | 50 rolls |
| T3 | 50 m², 5% waste, roll 610 mm × 1640 mm | roll area 1.0004 m² and 53 rolls |
| T4 | T1 with price £4.25 per roll | cost £225.25 |
| T5 | T1 with 50 mm underlay | underlay 2.5 m³, from the net 50 m² |
| T6 | 50 m² lawn, subtract 60 m² of beds | fails closed: net area not positive |
| T7 | Roll area 0 | fails closed: area per roll must be greater than 0 |
| T8 | Waste 2,5% | gross 51.25 m² and 52 rolls |
Compost
| Ref | Input | Expected |
|---|---|---|
| C1 | 1 m² at 50 mm | 50 L — matches the cited 50 L per m² figure |
| C2 | 100 m² at 50 mm | 5 m³ and 5,000 L |
| C3 | 100 m² at 80 mm | 8 m³ and 8,000 L |
| C4 | Rate mode: 10 m² at 7 kg/m² | 70 kg and no litre value anywhere |
| C5 | C4 with 25 kg packs | 3 packs |
| C6 | Rate mode with the rate left blank | fails closed: rate missing |
| C7 | Volume mode result | contains no kilogram or tonne value |
Bark and mulch
| Ref | Input | Expected |
|---|---|---|
| B1 | 100 m² at 50 mm | 5 m³ and 5,000 L |
| B2 | 100 m² at 75 mm | 7.5 m³ and 7,500 L |
| B3 | B1 with 70 L bags | 72 bags |
| B4 | B1 across bark, wood chip and other mulch | identical numbers for all three labels |
| B5 | B1 result | contains no mass value |
Lawn levelling
| Ref | Input | Expected |
|---|---|---|
| L1 | Whole area 40 m² at 15 mm | 0.600 m³ and 600 L |
| L2 | Four low spots: 2 m²×30 mm, 1.5 m²×20 mm, 3 m²×25 mm, 0.5 m²×40 mm | 0.185 m³ and 185 L over 7 m² treated |
| L3 | L2 with 10% overage | gross 0.2035 m³ |
| L4 | Cut 10 m² × 50 mm and fill 20 m² × 25 mm | two separate cards: cut 0.5 m³, fill 0.5 m³, never netted |
| L5 | A low spot with fill depth 0 | fails closed: no result |
Soil
| Ref | Input | Expected |
|---|---|---|
| S1 | Raised bed 2 m × 1 m at 0.4 m | 0.800 m³ and 800 L |
| S2 | S1 plus a border 6 m × 0.6 m at 0.25 m | 1.70 m³ and 1,700 L across two zone lines |
| S3 | Circular planter, diameter 0.8 m at 0.3 m | 150.79644737231007 L, displayed 150.8 L |
| S4 | A 0.9 m³ gross total with a 20% improver blend | improver 0.18 m³ and soil 0.72 m³, summing to 0.9 m³ |
| S5 | A zone with a blank depth | fails closed: no result |
| S6 | Blend 60% | fails closed: above maximum |
What these tools do not model
The arithmetic is exact. The world it describes is not, and the gap between them is where material orders go wrong.
- Settlement. Loose material compresses as it is watered and walked on. A filled bed or a levelled lawn will need topping up.
- Compaction. A cubic metre of soil placed loose and a cubic metre rolled firm are different amounts of material.
- Moisture content. This is why weight is only ever shown from a density you supply. Wet material can weigh substantially more than the same volume dry.
- Delivery minimums and access. Suppliers price part loads their own way, and a bulk bag needs somewhere hard and level to land.
- Ground stability, drainage falls and buried services. Nothing here assesses any of those, and no output should be read as a judgement about them.
- Whether the work is a good idea. The planners report what your answers point to and what they left out. The decision stays yours.
The tools
- Topsoil calculator
- Soil calculator
- Turf calculator
- Compost calculator
- Bark & mulch calculator
- Garden area calculator
- Lawn levelling calculator
- Scarifier vs aerator
- Lawn care planner
- Ground preparation planner
The source register lists the published guidance behind anything on this site that is not arithmetic, with the date each page was checked.