Open, documented formulas and constants for estimating how much building and landscaping material a job needs — mulch, gravel, sand, concrete, drywall, roofing and more.
The numbers here power the free calculators at buildcalc.xyz, where you can run any of them in your browser (no sign-up). This repo open-sources the underlying math and the density/coverage constants so anyone can verify, reuse, or build on them.
- 🧮 Live calculators: https://buildcalc.xyz/
- 📦 Machine-readable constants:
data/materials.json - 📜 License: MIT
Every material falls into one of three calculation methods:
| Method | Sold by | Formula | Materials |
|---|---|---|---|
| volume | cubic yards / bags | cubic_yards = area_sqft × depth_in ÷ 324 |
mulch, topsoil, sand, gravel, concrete |
| weight | US tons | tons = area_sqft × thickness_in × density ÷ ... |
asphalt |
| area | boxes / sheets / units | units = ceil(area_sqft × (1 + waste) ÷ coverage_per_unit) |
flooring, tile, drywall, roofing, sod, paver, etc. |
The key identity behind the volume method:
1 cubic yard spread 1 inch thick covers 324 sq ft (27 cu ft ÷ ¹⁄₁₂ ft = 324). So
cubic_yards = area × depth_in ÷ 324.
Bulk densities are typical industry mid-values — real material varies with moisture and gradation, so each entry in data/materials.json records its real-world range in a densityNote. Figures are cross-checked against inchcalculator.com.
A 200 sq ft bed at 3 in deep:
cubic_yards = 200 × 3 ÷ 324 ≈ 1.85 cu yd
bags (2 cu ft each) = ceil(1.85 × 27 ÷ 2) = 25 bags
Run it live: https://buildcalc.xyz/mulch-calculator/
Full data in data/materials.json. Summary of the volume/weight materials:
| Material | Method | Density (lb/cu yd) | Default depth | Bag size |
|---|---|---|---|---|
| Mulch | volume | 800 | 3 in | 2 cu ft |
| Topsoil | volume | 2100 | 4 in | 0.75 cu ft |
| Sand | volume | 2800 | 1 in | 0.5 cu ft |
| Gravel | volume | 3000 | 2 in | 0.5 cu ft |
| Concrete | volume | 4050 | 4 in | 0.6 cu ft (80 lb bag) |
| Asphalt | weight | 3915 (145 lb/cu ft) | 2 in | — |
Area-method materials (flooring, tile, drywall, plywood, roofing, sod, paver, laminate, carpet, wallpaper, insulation, brick, grass-seed, fertilizer) use a per-unit coverage and a waste factor — see the JSON.
- Mulch Calculator
- Topsoil Calculator
- Sand Calculator
- Gravel Calculator
- Concrete Calculator
- Asphalt Calculator
- Paver Calculator
- Flooring Calculator
- Tile Calculator
- Laminate Calculator
- Carpet Calculator
- Wallpaper Calculator
- Drywall Calculator
- Plywood Calculator
- Roofing Calculator
- Insulation Calculator
- Brick Calculator
- Sod Calculator
- Grass Seed Calculator
- Fertilizer Calculator
Mulch: flower beds · trees · vegetable gardens · playgrounds · pathways
Gravel: driveways · walkways · patios · fire pits · sheds
Sand: pavers · pools · sandboxes · paver joints
Topsoil: new lawns · raised beds · overseeding · gardens
Concrete: patios · driveways · sidewalks · footings
Insulation: attics · walls · crawl spaces
Drywall: walls · ceilings · garages
data/materials.json is plain JSON — drop it into any project:
import materials from './data/materials.json' assert { type: 'json' };
const mulch = materials.materials.find((m) => m.slug === 'mulch');
const cubicYards = (areaSqFt, depthIn) => (areaSqFt * depthIn) / materials.constants.sqftPerCuYdAt1in;
cubicYards(200, mulch.defaultDepthIn); // ≈ 1.85Found a density or coverage figure that's off for your region, or have a sourced correction? Open an issue or PR. Please cite a reference (manufacturer spec sheet, industry standard, etc.) so the value stays verifiable.
MIT — free to use, including the constants in data/materials.json. Attribution to buildcalc.xyz is appreciated but not required.