function toggleShapeInputs() {
var shape = document.getElementById("shapeType").value;
var rectDiv = document.getElementById("rect-inputs");
var circDiv = document.getElementById("circ-inputs");
if (shape === "rectangular") {
rectDiv.style.display = "block";
circDiv.style.display = "none";
} else {
rectDiv.style.display = "none";
circDiv.style.display = "block";
}
}
function calculateGravel() {
var shape = document.getElementById("shapeType").value;
var depthInches = parseFloat(document.getElementById("gravelDepth").value);
var depthFeet = depthInches / 12;
var cubicFeet = 0;
if (isNaN(depthInches) || depthInches <= 0) {
alert("Please enter a valid depth.");
return;
}
if (shape === "rectangular") {
var length = parseFloat(document.getElementById("gravelLength").value);
var width = parseFloat(document.getElementById("gravelWidth").value);
if (isNaN(length) || isNaN(width) || length <= 0 || width <= 0) {
alert("Please enter valid length and width.");
return;
}
cubicFeet = length * width * depthFeet;
} else {
var diameter = parseFloat(document.getElementById("gravelDiameter").value);
if (isNaN(diameter) || diameter <= 0) {
alert("Please enter a valid diameter.");
return;
}
var radius = diameter / 2;
cubicFeet = Math.PI * Math.pow(radius, 2) * depthFeet;
}
var cubicYards = cubicFeet / 27;
// Standard gravel density is approx 1.4 tons per cubic yard
var tons = cubicYards * 1.4;
// A standard 50lb bag is approx 0.5 cubic feet
var bags = cubicFeet / 0.5;
document.getElementById("resYards").innerText = cubicYards.toFixed(2);
document.getElementById("resTons").innerText = tons.toFixed(2);
document.getElementById("resBags").innerText = Math.ceil(bags);
document.getElementById("gravel-results").style.display = "block";
}
Gravel Calculator: Essential Tool for Landscaping Projects
Planning a new driveway, garden path, or drainage pit requires precision. Ordering too much gravel leads to wasted money and a massive pile of rocks you don't need, while ordering too little results in extra delivery fees and project delays. Our Gravel Calculator helps you determine exactly how many cubic yards and tons you need for any project shape.
How to Calculate Gravel Volume
Calculating gravel involves finding the volume of the space you want to fill and then converting that volume into the units used by suppliers (usually cubic yards or tons).
The Rectangular Formula
For most driveways and paths, use the rectangular formula:
Note: Since depth is usually measured in inches, divide the inches by 12 first (e.g., 3 inches = 0.25 feet).
The Circular Formula
For fire pits or circular flower beds, use the radius:
π (3.1415) × Radius² × Depth (ft) = Cubic Feet
Understanding Weight: Yards vs. Tons
Gravel is often sold by weight rather than volume. On average, one cubic yard of gravel weighs approximately 1.4 tons (or 2,800 pounds). However, this can vary based on the type of stone:
Pea Gravel: Smoother and rounds out, often slightly lighter per yard.
Crushed Stone / Road Base: Packs tightly and is often heavier due to the "fines" (dust) filling the gaps.
River Rock: Larger stones have more air gaps and may weigh slightly less per volume unit.
Practical Example
Imagine you are building a gravel driveway that is 40 feet long and 10 feet wide. You want a depth of 4 inches for stability.
Convert depth to feet: 4″ / 12 = 0.333 ft.
Calculate Cubic Feet: 40 × 10 × 0.333 = 133.2 cu ft.
Convert to Yards: 133.2 / 27 = 4.93 Cubic Yards.
Convert to Tons: 4.93 × 1.4 = 6.9 Tons.
In this scenario, you would likely order 7 tons of gravel to ensure full coverage.
Expert Tips for Ordering Gravel
When using our gravel calculator, keep these professional tips in mind:
Compaction: If you are using a plate compactor to harden the surface, order 5-10% extra material. The gravel will settle and occupy less space once packed down.
Delivery: Most dump trucks can carry 10-14 tons. If your project requires 15 tons, you may be charged for two delivery trips.
Base Layers: If building a driveway, you typically need a "3/4-inch minus" crushed stone for the base and a decorative "clean" stone for the top layer.