Planning a new driveway, patio, or garage floor requires accurate material estimation to avoid running out of concrete mid-pour or overspending on waste. This Concrete Slab Cost Calculator helps you determine exactly how much concrete volume (in cubic yards) you need based on the dimensions of your project.
Understanding the Concrete Formula
Concrete is typically sold by the cubic yard, even though we measure our projects in feet and inches. The formula used in this calculator is:
Length × Width: Gives you the square footage of the area.
Thickness ÷ 12: Converts the thickness from inches to feet.
Divide by 27: Since there are 27 cubic feet in one cubic yard, this final step gives you the volume in the unit used by concrete trucks.
Recommended Thickness for Concrete Slabs
Selecting the right thickness is crucial for the longevity of your slab:
4 Inches: The industry standard for residential sidewalks, patios, and air-conditioning pads. It handles foot traffic and light loads well.
5-6 Inches: Recommended for driveways, garage floors, or areas that will hold heavier vehicles like RVs or large trucks.
8+ Inches: Used for heavy industrial foundations or areas supporting substantial machinery.
Why Include a Waste Margin?
Professional contractors always order slightly more concrete than the exact mathematical volume. This "waste factor" (typically 5% to 10%) accounts for:
Spillage during the pour.
Uneven subgrade (dips in the ground) that require more concrete to level out.
Concrete remaining in the pump or truck chute.
Our calculator defaults to a 5% safety margin to ensure you have enough material to finish the job smoothly.
function calculateConcreteCost() {
// 1. 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 price = parseFloat(document.getElementById('pricePerYard').value);
var waste = parseFloat(document.getElementById('wasteFactor').value);
// 2. Validate Inputs
if (isNaN(length) || isNaN(width) || isNaN(price) || length <= 0 || width <= 0) {
alert("Please enter valid positive numbers for dimensions and price.");
return;
}
if (isNaN(waste)) { waste = 0; }
// 3. Perform Calculations
// Area in Square Feet
var areaSqFt = length * width;
// Thickness in Feet (inches / 12)
var thickFt = thickness / 12;
// Volume in Cubic Feet
var volCuFt = areaSqFt * thickFt;
// Volume in Cubic Yards (27 cu ft = 1 cu yard)
var volCuYards = volCuFt / 27;
// Add Waste Factor
var totalCuYards = volCuYards * (1 + (waste / 100));
// Calculate premix bags (Standard 80lb bag yields approx 0.6 cu ft)
// 1 cubic yard = 27 cu ft.
// Total Cu Ft with waste = totalCuYards * 27
var totalCuFtNeeded = totalCuYards * 27;
var bagsNeeded = Math.ceil(totalCuFtNeeded / 0.6);
// Calculate Total Cost
var totalCost = totalCuYards * price;
// 4. Update UI
document.getElementById('resArea').innerHTML = areaSqFt.toFixed(2) + " sq. ft.";
document.getElementById('resVolExact').innerHTML = volCuYards.toFixed(2) + " cu. yards";
document.getElementById('resVolOrder').innerHTML = totalCuYards.toFixed(2) + " cu. yards";
document.getElementById('resWasteVal').innerHTML = waste;
document.getElementById('resBags').innerHTML = bagsNeeded + " bags (80lb)";
document.getElementById('resCost').innerHTML = "$" + totalCost.toFixed(2);
// Show results
document.getElementById('results').style.display = "block";
}