Concrete Slab Cost & Volume Calculator
.calculator-container {
max-width: 800px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
padding: 20px;
border: 1px solid #e0e0e0;
border-radius: 8px;
background-color: #f9f9f9;
}
.calc-header {
text-align: center;
margin-bottom: 30px;
}
.calc-header h1 {
margin: 0;
color: #2c3e50;
}
.calc-body {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.calc-inputs {
flex: 1;
min-width: 300px;
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.calc-results {
flex: 1;
min-width: 300px;
background: #2c3e50;
color: #fff;
padding: 20px;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: center;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
font-size: 0.9em;
}
.form-group input, .form-group select {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.form-group .unit {
font-size: 0.8em;
color: #666;
margin-left: 5px;
}
button.calc-btn {
width: 100%;
padding: 12px;
background-color: #e67e22;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
margin-top: 10px;
}
button.calc-btn:hover {
background-color: #d35400;
}
.result-row {
margin-bottom: 15px;
border-bottom: 1px solid rgba(255,255,255,0.1);
padding-bottom: 10px;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
font-size: 0.9em;
opacity: 0.9;
}
.result-value {
font-size: 1.5em;
font-weight: bold;
color: #e67e22;
}
.calc-article {
margin-top: 40px;
background: #fff;
padding: 30px;
border-radius: 8px;
border-top: 4px solid #e67e22;
}
.calc-article h2 {
color: #2c3e50;
margin-top: 0;
}
.calc-article h3 {
color: #e67e22;
}
.calc-article p {
margin-bottom: 15px;
}
.calc-article ul {
margin-bottom: 15px;
padding-left: 20px;
}
@media (max-width: 600px) {
.calc-body {
flex-direction: column;
}
}
Total Volume Needed
0.00 Cu. Yards
80lb Bags Equivalent
0 Bags
Estimated Material Cost
$0.00
How to Calculate Concrete Slab Costs
Planning a new driveway, patio, or shed foundation requires accurate measurements to ensure you order enough concrete without overspending. Concrete is typically sold by the Cubic Yard (27 cubic feet), not by the square foot, because the thickness of the slab plays a crucial role in the total volume required.
The Concrete Formula
To determine the volume of concrete needed for a slab, use the following logic:
- Calculate Square Footage: Multiply Length (ft) × Width (ft).
- Convert Thickness: Divide the Thickness (inches) by 12 to get feet.
- Calculate Cubic Feet: Multiply Square Footage × Thickness (ft).
- Convert to Cubic Yards: Divide Cubic Feet by 27.
Standard Thickness Guidelines
Choosing the right thickness is vital for the longevity of your project:
- 4 Inches: The standard for residential sidewalks, patios, and standard driveways hosting passenger cars.
- 5-6 Inches: Recommended for driveways that hold heavier vehicles (RVs, large trucks) or for floating garage slabs.
Why Include a Waste Factor?
Professionals always order more concrete than the exact mathematical calculation. This "waste factor" or buffer (usually 5-10%) accounts for:
- Spillage during the pour.
- Uneven subgrade (ground) depth.
- Concrete remaining in the mixer or pump truck.
Running short on concrete during a pour is a disaster that leads to "cold joints" (cracks where wet concrete meets dry concrete), so it is always safer to order slightly more than needed.
function calculateConcrete() {
// 1. Get input values strictly by ID
var lenInput = document.getElementById('slabLength');
var widInput = document.getElementById('slabWidth');
var thkInput = document.getElementById('slabThickness');
var priceInput = document.getElementById('pricePerYard');
var wasteInput = document.getElementById('wasteFactor');
var length = parseFloat(lenInput.value);
var width = parseFloat(widInput.value);
var thickness = parseFloat(thkInput.value);
var pricePerYard = parseFloat(priceInput.value);
var wastePercent = parseFloat(wasteInput.value);
// 2. Validate inputs
if (isNaN(length) || length <= 0 || isNaN(width) || width <= 0 || isNaN(thickness) || thickness <= 0) {
alert("Please enter valid positive numbers for all dimensions.");
return;
}
if (isNaN(pricePerYard) || pricePerYard < 0) {
pricePerYard = 0;
}
// 3. Logic: Calculate Volume
// Convert thickness from inches to feet
var thicknessInFeet = thickness / 12;
// Cubic Feet = L * W * H(ft)
var cubicFeet = length * width * thicknessInFeet;
// Cubic Yards = Cubic Feet / 27
var cubicYards = cubicFeet / 27;
// 4. Apply Waste Factor
var wasteMultiplier = 1 + (wastePercent / 100);
var totalYards = cubicYards * wasteMultiplier;
// 5. Calculate Cost
var totalCost = totalYards * pricePerYard;
// 6. Calculate Bags (Approx 0.022 yards per 80lb bag)
var bagsNeeded = Math.ceil(totalYards / 0.0222);
// 7. Update DOM Results
document.getElementById('resYards').innerHTML = totalYards.toFixed(2) + "
Cu. Yards";
document.getElementById('resBags').innerHTML = bagsNeeded + "
Bags (80lb)";
document.getElementById('resCost').innerHTML = "$" + totalCost.toFixed(2);
}