*Results include a standard 10% safety margin for spillage and uneven subgrades.
function calculateConcrete() {
// Get input values
var length = parseFloat(document.getElementById('cc-length').value);
var width = parseFloat(document.getElementById('cc-width').value);
var depth = parseFloat(document.getElementById('cc-depth').value);
var quantity = parseFloat(document.getElementById('cc-quantity').value);
// Validation
if (isNaN(length) || isNaN(width) || isNaN(depth) || length <= 0 || width <= 0 || depth <= 0) {
alert("Please enter valid positive numbers for Length, Width, and Depth.");
return;
}
if (isNaN(quantity) || quantity < 1) {
quantity = 1;
}
// Logic: Calculate Volume in Cubic Feet
// Depth is in inches, so divide by 12 to get feet
var depthInFeet = depth / 12;
var cubicFeet = length * width * depthInFeet * quantity;
// Add 10% Waste Margin
var wasteFactor = 1.10;
var totalCubicFeet = cubicFeet * wasteFactor;
// Convert to Cubic Yards (27 cubic feet = 1 cubic yard)
var totalCubicYards = totalCubicFeet / 27;
// Calculate Bags
// Standard yields:
// 80lb bag ~= 0.60 cubic feet
// 60lb bag ~= 0.45 cubic feet
var bags80 = Math.ceil(totalCubicFeet / 0.60);
var bags60 = Math.ceil(totalCubicFeet / 0.45);
// Display Results
document.getElementById('res-yards').innerText = totalCubicYards.toFixed(2);
document.getElementById('res-feet').innerText = totalCubicFeet.toFixed(2);
document.getElementById('res-bags80').innerText = bags80;
document.getElementById('res-bags60').innerText = bags60;
// Show result div
document.getElementById('cc-results').style.display = 'block';
}
How to Calculate Concrete for Your Project
Whether you are pouring a patio, a driveway, or footings for a deck, calculating the correct amount of concrete is the most critical step in the planning process. Ordering too little results in a "cold joint" which weakens the structure, while ordering too much wastes money.
The Concrete Volume Formula
To determine how much concrete you need, you must calculate the volume of the space you are filling. The basic formula for a rectangular slab is:
The most common mistake DIYers make is forgetting to convert the thickness from inches to feet. For example, a 4-inch slab is actually 0.33 feet thick (4 divided by 12).
Cubic Yards vs. Pre-Mix Bags
Concrete is sold in two primary ways: by the cubic yard (from a ready-mix truck) or by the bag (for smaller projects).
When to use a Ready-Mix Truck
If your project requires more than 1 to 1.5 cubic yards of concrete, it is usually more economical and physically feasible to order a truck. One cubic yard of concrete weighs roughly 4,000 lbs. Mixing that amount by hand in a wheelbarrow is labor-intensive and difficult to finish before it begins to set.
When to use Pre-Mix Bags
For smaller pads, fence posts, or repairs, 60lb or 80lb bags are ideal.
80lb Bag: Yields approximately 0.60 cubic feet.
60lb Bag: Yields approximately 0.45 cubic feet.
Our calculator above automatically determines how many bags you need based on the volume of your project.
The Importance of the "Safety Margin"
This calculator adds a 10% safety margin to your total. Why? In the real world, subgrades are rarely perfectly flat. If your ground is slightly uneven, or if your forms bow out slightly under the weight of the wet concrete, you will need more material than the perfect mathematical volume suggests. Spillage during the pour is also common. It is always better to have an extra bag left over than to be one bag short while your wet concrete is hardening.