function calculateConcrete() {
// 1. Get input values
var lenInput = document.getElementById('cc_length');
var widInput = document.getElementById('cc_width');
var thickInput = document.getElementById('cc_thickness');
var wasteInput = document.getElementById('cc_waste');
var length = parseFloat(lenInput.value);
var width = parseFloat(widInput.value);
var thickness = parseFloat(thickInput.value);
// 2. Validate inputs
if (isNaN(length) || isNaN(width) || isNaN(thickness) || length <= 0 || width <= 0 || thickness <= 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
// 3. Calculation Logic
// Convert thickness from inches to feet
var thicknessInFeet = thickness / 12;
// Calculate Cubic Feet
var cubicFeet = length * width * thicknessInFeet;
// Calculate Cubic Yards (1 Yard = 27 Cubic Feet)
var cubicYards = cubicFeet / 27;
// Apply Waste Margin (if checked)
if (wasteInput.checked) {
var wasteMultiplier = 1.10; // 10% extra
cubicFeet = cubicFeet * wasteMultiplier;
cubicYards = cubicYards * wasteMultiplier;
}
// Calculate Bags
// 80lb bag yields approx 0.60 cubic feet
// 60lb bag yields approx 0.45 cubic feet
var bags80 = Math.ceil(cubicFeet / 0.60);
var bags60 = Math.ceil(cubicFeet / 0.45);
// 4. Update Result Display
document.getElementById('res_yards').innerText = cubicYards.toFixed(2);
document.getElementById('res_feet').innerText = cubicFeet.toFixed(2);
document.getElementById('res_bags80').innerText = bags80;
document.getElementById('res_bags60').innerText = bags60;
// Show result container
document.getElementById('cc-result').style.display = 'block';
}
How to Calculate Concrete for Slabs, Footings, and Driveways
Whether you are pouring a new patio, a driveway, or a simple walkway, knowing exactly how much concrete to order is crucial. Ordering too little can result in a structural seam that weakens your slab, while ordering too much is a waste of money. Use our Concrete Calculator above to determine the exact volume in cubic yards and the number of premix bags required for your project.
The Concrete Calculation Formula
To calculate concrete volume, you must determine the volume of the space in cubic feet and then convert that to cubic yards (the standard unit for ordering from a ready-mix truck).
Since thickness is usually measured in inches, divide the inches by 12 to get feet:
4 inches = 0.33 feet
6 inches = 0.50 feet
12 inches = 1.00 foot
To convert Cubic Feet to Cubic Yards, divide the total cubic feet by 27.
Premix Bags vs. Ready-Mix Truck
Should you buy bags from the hardware store or call a concrete truck? This depends on the volume of your project.
Project Size
Volume (Yards)
Recommendation
Small (Post holes, small pads)
Less than 0.5 yards
Premix Bags (60lb or 80lb)
Medium (Small sidewalks, shed bases)
0.5 to 1.5 yards
Either (Calculate cost difference)
Large (Driveways, large patios)
Over 1.5 yards
Ready-Mix Truck (More economical)
Why Include a Safety Margin?
In our calculator, we include an option to add a 10% safety margin. Professional contractors always order slightly more than the exact mathematical volume. Why?
Uneven Subgrade: The ground is rarely perfectly flat; dips require more concrete.
Spillage: Some concrete is lost during the pour or stays in the mixer/wheelbarrow.
Form Deflection: Wooden forms may bow out slightly under the weight of wet concrete, increasing the volume.
Standard Slab Thickness Guide
Before you calculate, ensure you are planning for the correct thickness:
4 Inches: Standard for walkways, patios, and residential floors.
5-6 Inches: Recommended for driveways and garages holding passenger vehicles.
8+ Inches: Heavy equipment areas or structural foundations.