Planning a patio, driveway, or shed foundation? Accurately calculating the amount of concrete needed is crucial to avoid running out mid-pour or overspending on materials. Our Concrete Slab Calculator simplifies the math by converting your dimensions into Cubic Yards—the standard unit for ordering ready-mix concrete.
The Concrete Formula
To determine the volume of concrete required, you must first calculate the volume in cubic feet and then convert it to cubic yards. The formula used is:
Step 1: Convert thickness from inches to feet (divide inches by 12).
Step 3: Divide Cubic Feet by 27 to get Cubic Yards.
Standard Slab Thicknesses
Choosing the right thickness depends on the intended use of the slab:
4 Inches: Standard for residential sidewalks, patios, and garage floors for passenger cars.
5-6 Inches: Recommended for driveways that handle heavier vehicles, trucks, or RVs.
6+ Inches: Heavy-duty industrial floors or commercial applications.
Why Include a Waste Margin?
Professional contractors always order slightly more concrete than the exact mathematical volume. Spillage, uneven subgrades, and form settling can increase the amount of material needed. A safety margin of 5% to 10% is highly recommended to ensure you have enough concrete to finish the job without stress.
function calculateConcrete() {
// Get input values using specific IDs
var length = parseFloat(document.getElementById("slabLength").value);
var width = parseFloat(document.getElementById("slabWidth").value);
var thickInches = parseFloat(document.getElementById("slabThickness").value);
var price = parseFloat(document.getElementById("pricePerYard").value);
var margin = parseFloat(document.getElementById("wasteMargin").value);
// Validation: Check if inputs are valid numbers
if (isNaN(length) || isNaN(width) || isNaN(thickInches) || length <= 0 || width <= 0 || thickInches <= 0) {
alert("Please enter valid positive numbers for all dimensions.");
return;
}
if (isNaN(price)) {
price = 0;
}
if (isNaN(margin)) {
margin = 0;
}
// Logic: Calculate Volume
// 1. Convert thickness to feet
var thickFeet = thickInches / 12;
// 2. Calculate Cubic Feet
var cubicFeet = length * width * thickFeet;
// 3. Apply Waste Margin
var multiplier = 1 + (margin / 100);
var totalCubicFeet = cubicFeet * multiplier;
// 4. Convert to Cubic Yards (27 cubic feet in 1 cubic yard)
var totalCubicYards = totalCubicFeet / 27;
// 5. Calculate Cost
var totalCost = totalCubicYards * price;
// 6. Calculate Bags (Approx 0.6 cubic feet yield per 80lb bag)
var bagsNeeded = Math.ceil(totalCubicFeet / 0.6);
// Display Results
document.getElementById("calc-results").style.display = "block";
document.getElementById("resYards").innerHTML = totalCubicYards.toFixed(2);
document.getElementById("resFeet").innerHTML = totalCubicFeet.toFixed(2);
document.getElementById("resBags").innerHTML = bagsNeeded;
// Format Currency
var formattedCost = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(totalCost);
document.getElementById("resCost").innerHTML = formattedCost;
}