Concrete Slab Calculator
/* Basic Reset and Layout */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
margin: 0;
padding: 20px;
background-color: #f9f9f9;
}
.calculator-wrapper {
max-width: 800px;
margin: 0 auto;
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
overflow: hidden;
}
.calc-header {
background-color: #2c3e50;
color: #fff;
padding: 20px;
text-align: center;
}
.calc-header h1 {
margin: 0;
font-size: 24px;
}
.calc-body {
padding: 20px;
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.input-section {
flex: 1;
min-width: 300px;
}
.results-section {
flex: 1;
min-width: 300px;
background-color: #f0f4f8;
padding: 20px;
border-radius: 6px;
border: 1px solid #d1d9e6;
}
/* Form Elements */
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
font-weight: 600;
margin-bottom: 5px;
font-size: 14px;
}
.form-group input, .form-group select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box; /* Important for padding */
}
.row {
display: flex;
gap: 15px;
}
.col {
flex: 1;
}
/* Button */
button.calc-btn {
width: 100%;
padding: 12px;
background-color: #e67e22;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s;
margin-top: 10px;
}
button.calc-btn:hover {
background-color: #d35400;
}
/* Results Styling */
.result-item {
margin-bottom: 15px;
border-bottom: 1px solid #e0e0e0;
padding-bottom: 10px;
}
.result-item:last-child {
border-bottom: none;
}
.result-label {
font-size: 14px;
color: #555;
}
.result-value {
font-size: 24px;
font-weight: 700;
color: #2c3e50;
}
.result-sub {
font-size: 12px;
color: #7f8c8d;
}
/* Article Content */
.content-article {
max-width: 800px;
margin: 40px auto;
background: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.content-article h2 {
color: #2c3e50;
border-bottom: 2px solid #e67e22;
padding-bottom: 10px;
margin-top: 30px;
}
.content-article p {
margin-bottom: 15px;
}
.content-article ul {
margin-bottom: 15px;
padding-left: 20px;
}
.content-article li {
margin-bottom: 8px;
}
.faq-item {
margin-bottom: 20px;
}
.faq-question {
font-weight: 700;
color: #2c3e50;
display: block;
margin-bottom: 5px;
}
@media (max-width: 600px) {
.calc-body {
flex-direction: column;
}
}
Required Volume
0.00
Cubic Yards
Premix Bags (80lb)
0
60lb Bags: 0
Total Volume (Exact)
0.00
Cubic Feet
Estimated Cost
$0.00
Enter price to see cost
function calculateConcrete() {
// 1. Get Inputs
var lengthFt = parseFloat(document.getElementById("slabLength").value);
var widthFt = parseFloat(document.getElementById("slabWidth").value);
var thickIn = parseFloat(document.getElementById("slabThickness").value);
var margin = parseFloat(document.getElementById("wasteMargin").value);
// Cost inputs (optional)
var priceYard = parseFloat(document.getElementById("pricePerYard").value);
var priceBag = parseFloat(document.getElementById("pricePerBag").value);
// 2. Validate Inputs
if (isNaN(lengthFt) || isNaN(widthFt) || isNaN(thickIn) || lengthFt <= 0 || widthFt <= 0 || thickIn 2, otherwise bags.
// But let's keep it simple: Show bulk cost if bulk price entered, else show bag cost if bag price entered.
if (!isNaN(priceYard) && priceYard > 0) {
totalCost = cubicYards * priceYard;
costMessage = "Based on Bulk Price";
} else if (!isNaN(priceBag) && priceBag > 0) {
totalCost = bags80Needed * priceBag;
costMessage = "Based on 80lb Bags";
} else {
totalCost = 0;
}
// 4. Update UI
document.getElementById("resYards").innerHTML = cubicYards.toFixed(2);
document.getElementById("resCubicFeet").innerHTML = cubicFeetTotal.toFixed(2);
document.getElementById("resBags80").innerHTML = bags80Needed;
document.getElementById("resBags60").innerHTML = bags60Needed;
document.getElementById("resTotalCost").innerHTML = "$" + totalCost.toFixed(2);
document.getElementById("costBasis").innerHTML = costMessage;
// Enable results view visual state
document.getElementById("resultsArea").style.opacity = "1";
}
How to Calculate Concrete for Your Slab
Whether you are pouring a patio, a driveway, or a shed foundation, getting the right amount of concrete is critical. Ordering too little leads to "cold joints" and structural weaknesses, while ordering too much is a waste of money.
This Concrete Slab Calculator helps you determine exactly how many cubic yards or premix bags you need based on the dimensions of your project.
The Concrete Formula
The math behind calculating concrete volume is straightforward geometry. You represent your slab as a rectangular prism.
- Step 1: Convert all dimensions to the same unit (usually feet). Since thickness is often measured in inches, divide the inches by 12 to get feet.
- Step 2: Multiply Length × Width × Thickness (in feet) to get Cubic Feet.
- Step 3: Divide the Cubic Feet by 27 to get Cubic Yards.
Note: Concrete is almost always sold by the cubic yard (often just called a "yard") when delivered by a truck.
Bag vs. Truck Delivery
When should you mix it yourself versus ordering a ready-mix truck?
- Small Jobs (Under 1 Yard): If your project requires less than 1 cubic yard (about 40-50 bags of 80lb mix), it is often cheaper and easier to mix it yourself or rent a small tow-behind mixer.
- Large Jobs (Over 1 Yard): Once you exceed 1 cubic yard, the physical labor involved in mixing bags becomes overwhelming. A ready-mix truck delivery is standard for driveways and large patios.
Why Include a Waste Margin?
The calculator includes a "Waste Margin" option, defaulting to 5%. This is crucial because:
- Ground surfaces are rarely perfectly level; dips require more concrete.
- Spillage occurs during the pour.
- Some concrete may remain in the mixer or pump.
For simple flatwork on a good subbase, 5% is standard. For uneven ground or complex shapes, consider 10%.
Frequently Asked Questions
How many 80lb bags of concrete make a yard?
It takes approximately 45 bags of 80lb concrete mix to equal one cubic yard. Each 80lb bag yields roughly 0.6 cubic feet.
How thick should my concrete slab be?
Standard thickness for a walkway or patio is 4 inches. For a driveway that will handle vehicles, 5 to 6 inches is recommended. Heavy-duty commercial slabs may be 8 inches or more.
What is the standard price of concrete?
As of 2024, ready-mix concrete typically costs between $125 and $175 per cubic yard, depending on your region and additives. Premix bags at hardware stores usually cost between $5.00 and $8.00 per 80lb bag.