function calculateConcrete() {
// Get input values
var length = parseFloat(document.getElementById("slabLength").value);
var width = parseFloat(document.getElementById("slabWidth").value);
var thickness = parseFloat(document.getElementById("slabThickness").value);
var wastePercent = parseFloat(document.getElementById("wasteFactor").value);
// Validation
if (isNaN(length) || isNaN(width) || isNaN(thickness) || length <= 0 || width <= 0 || thickness feet (divide by 12)
var volumeCubicFeet = length * width * (thickness / 12);
// Apply Waste Factor
var wasteMultiplier = 1 + (wastePercent / 100);
var totalCubicFeet = volumeCubicFeet * wasteMultiplier;
// Convert to Cubic Yards (1 Yard = 27 Cubic Feet)
var totalCubicYards = totalCubicFeet / 27;
// Calculate Bags
// Standard pre-mix concrete is approx 133 lbs per cubic foot (approx 3600 lbs/yd)
// Or using yield:
// 80lb bag yields ~0.60 cubic feet
// 60lb bag yields ~0.45 cubic feet
// 50lb bag yields ~0.375 cubic feet
var bags80 = Math.ceil(totalCubicFeet / 0.60);
var bags60 = Math.ceil(totalCubicFeet / 0.45);
var bags50 = Math.ceil(totalCubicFeet / 0.375);
// Display Results
document.getElementById("resYards").innerText = totalCubicYards.toFixed(2) + " yd³";
document.getElementById("resFeet").innerText = totalCubicFeet.toFixed(2) + " ft³";
document.getElementById("res80bags").innerText = bags80 + " bags";
document.getElementById("res60bags").innerText = bags60 + " bags";
document.getElementById("res50bags").innerText = bags50 + " bags";
// Show result div
document.getElementById("resultsArea").style.display = "block";
}
How to Calculate Concrete for Your Project
Whether you are pouring a patio, a driveway, or a simple shed foundation, calculating the correct amount of concrete is crucial. Ordering too little can lead to expensive "short load" fees or a cold joint in your slab, while ordering too much is money wasted on materials you can't use.
The Concrete Formula
To determine the volume of concrete needed for a rectangular slab, you use the following formula:
Remember to convert your thickness from inches to feet by dividing by 12 before multiplying. For example, a 4-inch thick slab is 0.33 feet thick.
Cubic Yards vs. Bags
Concrete is sold in two primary ways depending on the size of your project:
Cubic Yards: For large projects (usually over 1-2 yards), it is most cost-effective to order ready-mix concrete delivered by a truck. One cubic yard covers 81 square feet at 4 inches thick.
Pre-Mix Bags: For smaller DIY projects like walkways or post holes, buying 60lb or 80lb bags from a hardware store is standard. An 80lb bag yields approximately 0.6 cubic feet of concrete.
Why Include a Waste Factor?
Professional contractors always calculate a "waste" or "spillage" margin. This accounts for:
Uneven subgrade (holes or dips in the ground).
Spillage during the pour.
Concrete remaining in the mixer or wheelbarrow.
Formwork bowing out under pressure.
We recommend a 5-10% safety margin for most flatwork projects.
Common Concrete Thickness Guidelines
4 Inches: Standard for sidewalks, patios, and residential driveways (passenger cars).
5-6 Inches: Recommended for driveways holding heavier vehicles, RVs, or hot tubs.
6+ Inches: Heavy-duty foundations and commercial aprons.