function calculateConcrete() {
// Get input values
var length = parseFloat(document.getElementById('concLength').value);
var width = parseFloat(document.getElementById('concWidth').value);
var thickness = parseFloat(document.getElementById('concThick').value);
var waste = parseFloat(document.getElementById('concWaste').value);
// Get output elements
var resYards = document.getElementById('resYards');
var resFeet = document.getElementById('resFeet');
var resBags80 = document.getElementById('resBags80');
var resBags60 = document.getElementById('resBags60');
var errorMsg = document.getElementById('concError');
var resultsDiv = document.getElementById('concResults');
// Validation
if (isNaN(length) || isNaN(width) || isNaN(thickness) || length <= 0 || width <= 0 || thickness <= 0) {
errorMsg.style.display = 'block';
resultsDiv.style.display = 'none';
return;
} else {
errorMsg.style.display = 'none';
resultsDiv.style.display = 'block';
}
if (isNaN(waste)) {
waste = 0;
}
// Logic
// 1. Calculate base volume in cubic feet
// Formula: Length (ft) * Width (ft) * (Thickness (in) / 12)
var baseCuFt = length * width * (thickness / 12);
// 2. Add Waste Factor
var totalCuFt = baseCuFt * (1 + (waste / 100));
// 3. Convert to Cubic Yards
var totalCuYards = totalCuFt / 27;
// 4. Calculate Bags
// Standard pre-mix concrete is approximately 133 lbs per cubic foot (approx 3600 lbs/yd)
// Some calculators use 0.6 cu ft yield for 80lb bag and 0.45 for 60lb.
// 80lb bag yield approx 0.6 cubic feet.
// 60lb bag yield approx 0.45 cubic feet.
var bags80 = Math.ceil(totalCuFt / 0.6);
var bags60 = Math.ceil(totalCuFt / 0.45);
// Output Display
resYards.innerHTML = totalCuYards.toFixed(2) + " yd³";
resFeet.innerHTML = totalCuFt.toFixed(2) + " ft³";
resBags80.innerHTML = bags80 + " bags";
resBags60.innerHTML = bags60 + " bags";
}
How to Calculate Concrete for Your Slab
Calculating the correct amount of concrete is the most critical step in planning a driveway, patio, or shed foundation. Ordering too little results in a "cold joint" which weakens the structure, while ordering too much wastes money on disposal fees.
The Concrete Formula Explained
The standard formula for calculating concrete volume is Length × Width × Thickness. However, because concrete is sold by the Cubic Yard (yd³) but measurements are often taken in feet and inches, conversion is necessary.
Here is the step-by-step logic used in our calculator:
Convert Thickness: Since length and width are in feet, thickness (usually in inches) must be divided by 12 to convert it to feet.
Convert to Cubic Yards: There are 27 cubic feet in one cubic yard. Divide the total cubic feet by 27.
Add Safety Margin: We recommend adding 5-10% for waste, spillage, and uneven sub-grade depths.
Standard Slab Thickness Guidelines
Choosing the right thickness depends on the intended use of the slab:
4 Inches: Standard for walkways, patios, and residential driveways (passenger cars).
5-6 Inches: Recommended for heavy duty driveways (RV parking, trucks) or shed bases.
6+ Inches: Commercial heavy load areas.
Pre-Mix Bags vs. Ready-Mix Delivery
When should you buy bags at the hardware store versus ordering a concrete truck?
Use Bags (60lb or 80lb) when: You need less than 1 cubic yard of concrete. This is typically for setting fence posts, small landings, or repairs. Note that it takes roughly 45 bags (80lb) to make 1 cubic yard of concrete.
Order a Truck when: You need more than 1 cubic yard. Mixing over 40 bags by hand is labor-intensive and it is difficult to achieve a consistent pour before the concrete begins to set.