.calculator-wrapper {
max-width: 800px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #333;
line-height: 1.6;
}
.calc-container {
background: #fdfdfd;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 30px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
margin-bottom: 40px;
}
.calc-title {
text-align: center;
color: #2c3e50;
margin-bottom: 25px;
font-size: 24px;
font-weight: 700;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
font-size: 14px;
}
.form-group input, .form-group select {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.form-group .unit {
font-size: 12px;
color: #666;
margin-top: 4px;
display: block;
}
.calc-btn {
grid-column: span 2;
background-color: #e67e22;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s;
margin-top: 10px;
width: 100%;
}
.calc-btn:hover {
background-color: #d35400;
}
.results-box {
grid-column: span 2;
background: #f8f9fa;
border: 1px solid #dee2e6;
padding: 20px;
border-radius: 4px;
margin-top: 20px;
display: none;
}
.results-box.visible {
display: block;
}
.result-row {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.result-row:last-child {
border-bottom: none;
}
.result-value {
font-weight: bold;
color: #2c3e50;
}
.highlight-result {
color: #e67e22;
font-size: 1.1em;
}
.seo-content {
margin-top: 50px;
padding: 20px;
}
.seo-content h2 {
color: #2c3e50;
border-bottom: 2px solid #e67e22;
padding-bottom: 10px;
margin-top: 30px;
}
.seo-content p {
margin-bottom: 15px;
text-align: justify;
}
.seo-content ul {
margin-bottom: 20px;
padding-left: 20px;
}
.seo-content li {
margin-bottom: 8px;
}
@media (max-width: 600px) {
.form-grid {
grid-template-columns: 1fr;
}
.calc-btn, .results-box {
grid-column: span 1;
}
}
How to Calculate Concrete for Slabs and Driveways
Planning a patio, driveway, or shed foundation requires precise volume calculations. Ordering too little concrete results in "cold joints" and structural weaknesses, while ordering too much wastes money. This Concrete Slab Calculator helps you determine exactly how many cubic yards or premix bags you need for your project.
The Formula for Concrete Volume
To calculate the concrete volume, you must first determine the cubic footage of your slab using the formula:
Length (ft) × Width (ft) × Thickness (ft) = Cubic Feet
Since concrete is sold by volume, note that thickness is usually measured in inches. You must convert inches to feet by dividing by 12 (e.g., 4 inches = 0.33 feet). Once you have the cubic footage, divide by 27 to convert to Cubic Yards, which is the standard unit for ready-mix trucks.
Choosing the Right Thickness
- 4 Inches: Standard for residential sidewalks, patios, and garage floors.
- 5-6 Inches: Recommended for driveways that will host heavy vehicles or RVs.
- 6+ Inches: Heavy-duty foundations or commercial applications.
Bagged Concrete vs. Ready-Mix Truck
If your project requires less than 1 cubic yard (approximately 45-60 bags of 80lb concrete), it is often more economical to mix it yourself using bagged cement. For projects larger than 1-2 cubic yards, ordering a ready-mix truck is usually cheaper and ensures a more consistent cure. Our calculator provides estimates for both scenarios so you can compare costs effectively.
Accounting for Waste
No pour is perfect. Uneven subgrades, spillage, and form setting errors can reduce your effective volume. Professional contractors typically add a 5% to 10% safety margin (waste factor) to their orders. It is always better to have a small amount leftover than to run out mid-project.
function calculateConcrete() {
// Get input values using var
var len = parseFloat(document.getElementById("slabLength").value);
var wid = parseFloat(document.getElementById("slabWidth").value);
var thickInches = parseFloat(document.getElementById("slabThickness").value);
var waste = parseFloat(document.getElementById("wasteFactor").value);
var price = parseFloat(document.getElementById("pricePerYard").value);
var bagSize = parseInt(document.getElementById("bagType").value);
// Validation
if (isNaN(len) || isNaN(wid) || isNaN(thickInches)) {
alert("Please enter valid numbers for length, width, and thickness.");
return;
}
// Core Calculations
var thickFeet = thickInches / 12;
var cubicFeetRaw = len * wid * thickFeet;
var cubicFeetTotal = cubicFeetRaw * waste;
var cubicYards = cubicFeetTotal / 27;
// Bag Calculations (Yield per bag approx: 80lb=0.6cuft, 60lb=0.45cuft, 40lb=0.30cuft)
var cubicFeetPerBag = 0.6; // Default 80lb
if (bagSize === 60) cubicFeetPerBag = 0.45;
if (bagSize === 40) cubicFeetPerBag = 0.30;
var totalBags = Math.ceil(cubicFeetTotal / cubicFeetPerBag);
// Cost Calculation (Truck)
var totalCost = 0;
if (!isNaN(price)) {
totalCost = cubicYards * price;
}
// Update UI
document.getElementById("resYards").innerHTML = cubicYards.toFixed(2) + " cu. yd.";
document.getElementById("resFeet").innerHTML = cubicFeetTotal.toFixed(2) + " cu. ft.";
document.getElementById("bagLabel").innerHTML = bagSize;
document.getElementById("resBags").innerHTML = totalBags + " bags";
if (totalCost > 0) {
document.getElementById("resCost").innerHTML = "$" + totalCost.toFixed(2);
} else {
document.getElementById("resCost").innerHTML = "Enter Price/Yard";
}
// Show results
document.getElementById("results").className = "results-box visible";
}