function calculateConcrete() {
// 1. Get Elements by ID
var lengthInput = document.getElementById("conc_length");
var widthInput = document.getElementById("conc_width");
var thickInput = document.getElementById("conc_thickness");
var wasteInput = document.getElementById("conc_waste");
var resultArea = document.getElementById("conc-result-area");
// 2. Parse Values
var length = parseFloat(lengthInput.value);
var width = parseFloat(widthInput.value);
var thickness = parseFloat(thickInput.value);
var wasteMultiplier = parseFloat(wasteInput.value);
// 3. Validation
if (isNaN(length) || isNaN(width) || isNaN(thickness) || length <= 0 || width <= 0 || thickness <= 0) {
alert("Please enter valid positive numbers for Length, Width, and Thickness.");
return;
}
// 4. Calculations
// Convert thickness from inches to feet
var thicknessFeet = thickness / 12;
// Calculate base Cubic Feet
var cubicFeetRaw = length * width * thicknessFeet;
// Apply Waste Margin
var cubicFeetTotal = cubicFeetRaw * wasteMultiplier;
// Calculate Cubic Yards (27 cubic feet per yard)
var cubicYards = cubicFeetTotal / 27;
// Calculate Bags
// Average yield: 80lb bag ≈ 0.60 cubic feet
// Average yield: 60lb bag ≈ 0.45 cubic feet
var bags80 = Math.ceil(cubicFeetTotal / 0.60);
var bags60 = Math.ceil(cubicFeetTotal / 0.45);
// 5. Update HTML Output
document.getElementById("res_yards").innerHTML = cubicYards.toFixed(2) + " Cubic Yards";
document.getElementById("res_feet").innerHTML = cubicFeetTotal.toFixed(2) + " ft³";
document.getElementById("res_80lb").innerHTML = bags80 + " Bags";
document.getElementById("res_60lb").innerHTML = bags60 + " Bags";
// Show result area
resultArea.style.display = "block";
}
How to Calculate Concrete for Slabs and Footings
Calculating the correct amount of concrete is crucial for any construction project, whether you are pouring a patio, a driveway, or a shed foundation. Ordering too little leads to expensive "short load" fees or cold joints, while ordering too much is a waste of money.
The Concrete Formula
To determine the volume of concrete needed, you must calculate the cubic footage of the area and then convert it to cubic yards (the standard unit for ordering ready-mix concrete).
The basic formula is: Length (ft) × Width (ft) × Thickness (ft) = Cubic Feet
Note that thickness is usually measured in inches, so you must divide the inches by 12 to get feet. For example, a 4-inch slab is 0.33 feet thick.
Cubic Yards vs. Pre-Mix Bags
If your project requires less than 1 cubic yard of concrete, it is often more economical to use pre-mix bags (like Quikrete or Sakrete) from a home improvement store. If you need more than 1 or 2 yards, ordering a truck is usually easier.
1 Cubic Yard = 27 Cubic Feet
80lb Bag Yield = Approximately 0.60 Cubic Feet
60lb Bag Yield = Approximately 0.45 Cubic Feet
Why Include a Waste Margin?
Professional concrete finishers always order slightly more than the exact mathematical volume. This accounts for:
Spillage during transport or wheelbarrowing.
Uneven subgrade (the ground is rarely perfectly flat).
Settling of the formwork.
A safety margin of 5% to 10% is highly recommended to ensure you can finish the job in one pour.