.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: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 25px;
margin-bottom: 40px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.calc-title {
text-align: center;
color: #2c3e50;
margin-bottom: 25px;
font-size: 24px;
font-weight: 700;
}
.input-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-bottom: 20px;
}
.input-group {
display: flex;
flex-direction: column;
}
.input-group label {
font-size: 14px;
font-weight: 600;
margin-bottom: 8px;
color: #555;
}
.input-group input {
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
transition: border-color 0.3s;
}
.input-group input:focus {
border-color: #0073aa;
outline: none;
}
.input-full {
grid-column: 1 / -1;
}
.calc-btn {
width: 100%;
background-color: #0073aa;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
.calc-btn:hover {
background-color: #005177;
}
.results-box {
margin-top: 25px;
padding: 20px;
background-color: #fff;
border: 1px solid #ddd;
border-left: 5px solid #0073aa;
border-radius: 4px;
display: none;
}
.result-row {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
font-weight: 600;
color: #555;
}
.result-value {
font-weight: 700;
color: #2c3e50;
font-size: 18px;
}
.article-content h2 {
color: #2c3e50;
margin-top: 30px;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
.article-content h3 {
color: #444;
margin-top: 25px;
}
.article-content p, .article-content li {
margin-bottom: 15px;
font-size: 16px;
}
.article-content ul {
padding-left: 20px;
}
@media (max-width: 600px) {
.input-grid {
grid-template-columns: 1fr;
}
}
How to Calculate Concrete for Slabs
Planning a patio, driveway, or shed foundation? Calculating the correct amount of concrete is crucial to avoid running out mid-pour or overspending on materials. Our concrete slab calculator helps you estimate the exact volume required in cubic yards and cubic feet, as well as the number of pre-mix bags needed for smaller jobs.
The Concrete Formula
To determine the volume of concrete needed for a rectangular slab, you use the standard volume formula:
Volume = Length × Width × Thickness
However, since dimensions are often mixed (feet for area, inches for thickness), the calculation requires conversion:
- First, convert the thickness from inches to feet by dividing by 12.
- Multiply Length (ft) × Width (ft) × Thickness (ft) to get Cubic Feet.
- To get Cubic Yards (the standard unit for ordering ready-mix trucks), divide the Cubic Feet by 27.
Accounting for Waste
It is industry standard to add a "safety margin" or waste percentage to your order. Ground surfaces are rarely perfectly level, and spillage occurs during the pour. We recommend adding:
- 5-10% for simple, rectangular forms on flat ground.
- 10-15% for irregular shapes or uneven sub-grades.
Ready-Mix vs. Pre-Mix Bags
For large projects (over 1-2 cubic yards), ordering ready-mix concrete from a truck is usually more consistent and labor-efficient. For smaller projects like walkways or shed bases, pre-mix bags (60lb or 80lb) are common. Note that an 80lb bag typically yields about 0.6 cubic feet of cured concrete, while a 60lb bag yields about 0.45 cubic feet.
function calculateConcrete() {
// Get input values
var len = document.getElementById('slabLength').value;
var wid = document.getElementById('slabWidth').value;
var thick = document.getElementById('slabThickness').value;
var waste = document.getElementById('wastePercent').value;
var price = document.getElementById('pricePerYard').value;
// Validate inputs
if (len === "" || wid === "" || thick === "") {
alert("Please enter Length, Width, and Thickness to calculate.");
return;
}
// Convert strings to floats
var l = parseFloat(len);
var w = parseFloat(wid);
var t = parseFloat(thick);
var wst = parseFloat(waste);
var p = parseFloat(price);
if (isNaN(l) || isNaN(w) || isNaN(t) || l <= 0 || w <= 0 || t 0) {
totalCost = totalCuYd * p;
hasCost = true;
}
// Update UI
document.getElementById('resYards').innerText = totalCuYd.toFixed(2);
document.getElementById('resFeet').innerText = totalCuFt.toFixed(2);
document.getElementById('resBags60').innerText = bags60;
document.getElementById('resBags80').innerText = bags80;
if (hasCost) {
document.getElementById('costRow').style.display = "flex";
document.getElementById('resCost').innerText = "$" + totalCost.toFixed(2);
} else {
document.getElementById('costRow').style.display = "none";
}
// Show results div
document.getElementById('resultsArea').style.display = "block";
}