function calculateConcrete() {
// 1. Get input values using specific IDs
var length = parseFloat(document.getElementById('concLength').value);
var width = parseFloat(document.getElementById('concWidth').value);
var thickness = parseFloat(document.getElementById('concThick').value);
var wastePercent = parseFloat(document.getElementById('concWaste').value);
// 2. Validate inputs
if (isNaN(length) || isNaN(width) || isNaN(thickness)) {
alert("Please enter valid numbers for Length, Width, and Thickness.");
return;
}
// Default waste to 0 if empty
if (isNaN(wastePercent)) {
wastePercent = 0;
}
// 3. Calculation Logic
// Convert thickness from inches to feet
var thicknessInFeet = thickness / 12;
// Calculate raw volume in cubic feet
var rawCubicFeet = length * width * thicknessInFeet;
// Add waste margin
var totalCubicFeet = rawCubicFeet * (1 + (wastePercent / 100));
// Convert to Cubic Yards (1 yard = 27 cubic feet)
var totalCubicYards = totalCubicFeet / 27;
// Calculate Bags
// Standard yield: 80lb bag ≈ 0.6 cubic feet, 60lb bag ≈ 0.45 cubic feet
var bags80 = Math.ceil(totalCubicFeet / 0.6);
var bags60 = Math.ceil(totalCubicFeet / 0.45);
// 4. Display Results
document.getElementById('resCubicYards').innerText = totalCubicYards.toFixed(2) + " Cubic Yards";
document.getElementById('resCubicFeet').innerText = totalCubicFeet.toFixed(2) + " ft³";
document.getElementById('resBags80').innerText = bags80;
document.getElementById('resBags60').innerText = bags60;
// Show result box
document.getElementById('ccResults').style.display = "block";
}
How to Calculate Concrete for Slabs, Footings, and Walls
Planning a construction project requires precise material estimation to avoid costly shortages or unnecessary waste. Our Concrete Calculator helps you determine exactly how much concrete you need for slabs, patios, footings, and driveways in both cubic yards and premix bags.
The Concrete Calculation Formula
To calculate the volume of concrete required for a rectangular slab, you use the standard volume formula:
Volume = Length × Width × Thickness
However, the challenge lies in unit conversion. Most measurements are taken in feet for length and width, but inches for thickness. Here is the step-by-step process used by our tool:
Convert Thickness: Divide the thickness (in inches) by 12 to convert it to feet.
Convert to Cubic Yards: Divide the total Cubic Feet by 27 (since there are 27 cubic feet in one cubic yard).
How Many Bags of Concrete Do I Need?
If you are using a ready-mix truck, you will order by the Cubic Yard. However, for smaller DIY projects like walkways or shed bases, you will likely buy premix bags (Quikrete or Sakrete) from a hardware store.
80lb Bag Yield: Approximately 0.60 cubic feet of cured concrete.
60lb Bag Yield: Approximately 0.45 cubic feet of cured concrete.
Example: A 10′ x 10′ slab that is 4 inches thick requires roughly 1.23 cubic yards of concrete, or about 56 bags of 80lb premix.
Why Include a Waste Margin?
Professional contractors always calculate a "waste" or "spillover" margin. This accounts for:
Uneven subgrade or excavation depth.
Spillage during the pour.
Form spreading (forms bowing out slightly under pressure).
We recommend a standard safety margin of 5% to 10%. Our calculator allows you to adjust this percentage to ensure you don't run out of material mid-project.
Common Thickness Guidelines
4 Inches: Standard for sidewalks, patios, and residential garage floors.
5-6 Inches: Required for driveways supporting heavier vehicles or light industrial use.
8+ Inches: Heavy-duty foundations and commercial slabs.