Skip to content

How we calculate

Yard & Foot publishes every formula, density and rounding rule its calculators use, so you can check any result by hand. This page explains how each type of calculator works, where the material weights come from, how we test the numbers in our guides and how pages are reviewed before search engines can find them. Open Show the math under any calculator to see the same steps worked with your own numbers.

Volume calculators: gravel, stone, sand, soil and asphalt

These calculators share one volume engine: gravel, pea gravel, stone, river rock, landscape rock, topsoil, fill dirt, sand, asphalt, cubic yards, cubic feet and cubic yards to tons. Because they run the same code, a cubic yard of #57 stone weighs the same in every one of them.

Cubic feet = area × depth ÷ 12 × (1 + waste)


Cubic yards = cubic feet ÷ 27


Tons = cubic yards × density (tons per cubic yard)

Lengths in feet, depth in inches. Waste is a percentage, so 10% is 0.10.

The calculator first works out the area. A rectangle is length × width, a circle is π × diameter² ÷ 4, a ring is the outer circle minus the inner one, and a triangle is base × height ÷ 2. You can add up to 10 areas and mark any of them to subtract, such as a planting bed inside a patio. If you already know the area, you can type it in square feet instead.

Depth is converted from inches to feet, multiplied by the area and raised by the waste allowance to give cubic feet. Dividing by 27 gives cubic yards, because a cubic yard is 3 ft × 3 ft × 3 ft. The material’s density turns cubic yards into tons. Tons here are US short tons of 2,000 lb.

For example, take a path 20 ft long and 3 ft wide, 3 inches deep, with 10% extra:

  • Area: 20 × 3 = 60 sq ft
  • Volume: 60 × 3 ÷ 12 × 1.10 = 16.5 cubic feet
  • Cubic yards: 16.5 ÷ 27 = 0.61 yd³
  • Weight of all-purpose gravel at 1.42 t/yd³: 0.61 × 1.42 = 0.87 tons
  • Bags: 35 bags of 50 lb, or 33 bags of 0.5 ft³
Pipeline: a 20 × 3 ft path, 3 in deep, plus 10% is 16.5 cu ft, 0.61 yd³ and 0.87 tons, or 35 bags of 50 lb.

The calculator multiplies the unrounded values, so a hand calculation with the rounded figures can differ in the last digit.

Other volume options

  • Gravel, pea gravel, stone, river rock, landscape rock and the yards-to-tons tool show a typical tons range next to the result. It is the same volume at the density minus 0.1 and plus 0.1 t/yd³, since material weight varies by supplier.
  • Gravel, pea gravel and stone also note that most yards sell in ½-ton steps, and round the order up to the next half ton.
  • The Damp or wet delivery option multiplies the weight by the factor in the density table below. The volume does not change.
  • Crusher run, hot-mix asphalt and cold patch use compacted densities, so the depth you enter is the finished depth after compaction.
  • “1 ton covers about N sq ft” is the area one ton spreads over at your depth: (1 ÷ density) × 27 ÷ (depth ÷ 12).
  • The yards-to-tons calculator also runs backwards: tons ÷ density = cubic yards.
  • Under More options you can replace our density with your supplier’s figure, in t/yd³ or kg/m³.

In metric, lengths are entered in meters and centimeters, and results come out in cubic meters, metric tonnes and 25 kg bags. Internally everything is converted to feet first and back again at the end, so both systems use the same formula. One ton per cubic yard equals about 1,187 kg per cubic meter.

How bags are counted

Bags are counted one of two ways, depending on how the product is sold and used:

  • By weight: tons × 2,000 ÷ the bag weight in pounds. A 50 lb bag of gravel or sand is counted this way.
  • By volume: cubic feet ÷ the bag volume. Bags labeled in cubic feet are counted this way, and so are two bags that are sold by weight but fill by volume: 40 lb topsoil bags (about 0.75 ft³) and 50 lb cold-patch bags (about 0.5 ft³).

Bag counts always round up, so 34.1 bags becomes 35. When a job needs more than 100 bags, the bag result is hidden and the calculator says that buying in bulk is usually cheaper and easier at that size.

Bag sizes and how each is counted
BagCounted byFormulaOffered in
50 lb bagsWeighttons × 2,000 ÷ 50Gravel, Pea gravel, Stone, Sand
0.5 ft³ bagsVolumecubic feet ÷ 0.5Gravel, Pea gravel, Stone, River rock, Landscape rock
40 lb bags (≈0.75 ft³)Volumecubic feet ÷ 0.75Topsoil
1 ft³ bagsVolumecubic feet ÷ 1Topsoil
50 lb cold-patch bags (≈0.5 ft³)Volumecubic feet ÷ 0.5Asphalt
25 kg bagsWeighttonnes × 1,000 ÷ 25Every bag calculator in metric

Waste allowance

Waste covers spillage and uneven ground. The calculator multiplies the volume (or the roof area, or the board feet) by 1 plus the waste percentage, before converting to tons or bags. You can change the allowance on every calculator that has one.

Default waste allowance by calculator
CalculatorDefaultOptions
Gravel Calculator10%0%, 5%, 10%, 15%, 20%
Pea Gravel Calculator10%0%, 5%, 10%, 15%, 20%
Stone Calculator10%0%, 5%, 10%, 15%, 20%
River Rock Calculator10%0%, 5%, 10%, 15%, 20%
Landscape Rock Calculator10%0%, 5%, 10%, 15%, 20%
Topsoil Calculator0%0%, 5%, 10%, 15%, 20%
Sand Calculator10%0%, 5%, 10%, 15%, 20%
Asphalt Calculator5%0%, 5%, 10%
Cubic Yard Calculator0%0%, 5%, 10%, 15%, 20%
Cubic Feet Calculator0%None
Cubic Yards to Tons Calculator0%0%, 5%, 10%
Fill Dirt Calculator25%0%, 10%, 15%, 25%, 40%
Roof Square Calculator10%0%, 5%, 10%, 15%, 20%; 15% default for hip roofs
Shingle Calculator10%0%, 5%, 10%, 15%, 20%; 15% default for hip roofs
Board Foot Calculator0%0%, 5%, 10%, 15%, 20%, 30%

Roofing calculators

The roof pitch, rafter length, roof square and shingle calculators share one set of roof formulas. Pitch is always expressed as inches of rise per 12 inches of run, such as 6/12.

Pitch multiplier = √(1 + (x ÷ 12)²)


Roof angle = arctan(x ÷ 12)


Slope % = x ÷ 12 × 100

x is the pitch in inches of rise per 12 inches of run.

The pitch multiplier is how much longer a sloped surface is than its flat footprint. At 6/12 it is 1.118, so every foot of level run becomes 1.118 ft along the roof.

Roof area and squares

Roof area is the footprint, plus the overhang on every side, times the pitch multiplier. Gable, hip and shed roofs of the same pitch have the same area. The shape changes only the edge lengths: eaves, rakes, ridge and hips. For a hip roof, each hip runs √(2 + (x ÷ 12)²) times half the short side of the footprint. Roofs with several sections are added section by section, each at its own pitch.

One roofing square is 100 sq ft. Squares to order = roof area × (1 + waste) ÷ 100. A 40 × 30 ft footprint with no overhang at 6/12 has a roof area of 1,341.6 sq ft. With 10% waste that is 14.76 squares.

Shingles and accessories

Each shingle accessory has its own formula. Bundles, underlayment and nails are based on squares, so they include the waste allowance. Starter, ridge cap and drip edge are measured along the roof edges and leave waste out.

ItemHow it is countedDefault
Shingle bundlessquares × bundles per square, rounded up3 per square for architectural and 3-tab, 4 for designer, or your own figure
Starter strip(eaves + rakes) ÷ coverage per bundle, rounded up105 linear feet per bundle; rakes can be left out
Ridge cap(ridge + hips) ÷ coverage per bundle, rounded up25 linear feet per bundle
Underlaymentsquares ÷ squares per roll, rounded upSynthetic 10 squares, #15 felt 4, #30 felt 2
Drip edge(eaves + rakes) ÷ piece length, rounded up10 ft pieces (3 m in metric)
Nailssquares × shingles per square × nails per shingle4 nails per shingle, 6 for high-wind areas

For the 40 × 30 ft gable roof above, with architectural shingles, 10% waste, synthetic underlayment and starter on the rakes, the calculator gives 45 bundles of shingles, 2 bundles of starter, 2 bundles of ridge cap, 2 rolls of underlayment, 15 pieces of drip edge and 3,838 nails.

Bundle counts and coverage vary by product line, so check the wrapper. Some designer shingles take 4 or 5 bundles per square. Below 4/12 the calculator warns that shingles need a double layer of underlayment, and below 2/12 it says the roof is too flat for shingles.

Rafter length

Run (gable) = span ÷ 2 − ridge thickness ÷ 2


Run (shed) = span


Rafter length = run × pitch multiplier + overhang × pitch multiplier

Lengths in feet. Ridge board and overhang in inches ÷ 12 = feet.

On a shed roof the high-side overhang is added to the tail as well. If you measured the overhang along the rafter instead of level, the calculator uses it as entered.

A 24 ft wide gable roof at 6/12 with a 1½ in ridge board and a 12 in level overhang needs rafters 14′ 5 5/8″ long. The calculator adds a 2 in trimming allowance, which you can change, and picks the shortest standard board that fits: 8 to 24 ft in 2 ft steps, or 2.4 to 7.2 m in 0.3 m steps in metric. The plumb cut angle equals the roof angle, and the seat cut is 90° minus that. The rafter count is the wall length ÷ spacing, rounded up, plus one, doubled for a gable roof.

The rafter calculator gives lengths and angles only. It does not size lumber or check spans, snow loads or wind loads. Take those from your local building code or a licensed professional.

Board feet

The board foot calculator uses nominal sizes, so a 2×6 counts as 2 in × 6 in and 4/4 hardwood counts as 1 in thick.

Board feet = thickness × width × length ÷ 12 × quantity

Thickness and width in inches, length in feet.

One 2×6 that is 8 ft long is 8 board feet, and ten of them are 80. Every row of the cut list is added up, then the waste allowance is applied to the total. The calculator also shows linear feet, and in metric it takes millimeters and meters and adds a cubic-meter total.

Rounding and what the results show

Formulas never round along the way. Rounding happens only when a number is shown, using these rules:

ResultShown as
Cubic yards, tons, cubic meters, metric tonnes2 decimal places
Cubic feet, liters1 decimal place
Bags, shingle bundles, rolls, drip edge pieces, nails, boards, raftersWhole numbers, always rounded up
Estimated costNearest whole dollar
Roofing squares2 decimal places
Roof areaWhole square feet (1 decimal place in square meters)
Rafter lengthNearest ⅛ inch (nearest millimeter in metric)
Roof angle2 decimal places; pitch and slope % to 1
Board feetUp to 2 decimal places

The first result tile is the number you order. Each calculator shows only units that a buyer uses: a US buyer sees cubic yards and tons rather than cubic meters, and the metric view swaps in cubic meters, metric tonnes and 25 kg bags. The cost tile shows “Add a price” until you enter a price you were quoted. The cost uses the exact quantity, except for bags, where it uses the whole number of bags you would buy.

Material densities

Each density below is the weight of one cubic yard of loose, dry material as delivered, in US short tons, unless it is marked as compacted. It comes from at least one published source, and usually two or three. Where we found only one source, or the sources disagree by more than 10%, the value is marked as less certain, and your supplier’s figure matters most. The typical range shows the spread across those sources. The damp delivery column is the extra weight the Damp or wet delivery option adds. Hot-mix asphalt is set at 145 lb per cubic foot, compacted.

Material densities used by the calculators
MaterialTons per yd³Typical rangekg per m³Damp deliveryNotesSources
Gravel (¼–2″, all-purpose)1.421.28–1.521,685+19%–1, 2
Pea gravel1.301.25–1.401,543+19%Less certain1, 3, 4
Bank run / pit run gravel1.601.46–1.651,898–Less certain1, 2
River rock1.351.25–1.451,602–Less certain4, 5
#57 stone / PA 2B (¾–1″ clean crushed)1.351.29–1.451,602––1, 3, 6
¾″ crushed limestone1.301.15–1.351,543––1, 3, 7
Crushed granite / granite chips1.351.30–1.391,602––1, 3
Basalt / trap rock1.351.29–1.381,602––3, 6
#8 stone (⅜″ chips)1.301.16–1.321,543–Less certain6, 8
#67 stone (¾″ and smaller)1.401.35–1.451,661–Less certain3, 6
#2 stone (1½–2½″)1.301.25–1.401,543–Less certain3, 6
#3 stone (1–2″)1.301.25–1.401,543–Less certain3, 6
#4 stone (¾–1½″)1.301.25–1.401,543–Less certain3, 6
Stone dust / screenings1.551.17–1.751,839–Less certain1, 3, 8
Rip rap (4–24″ rock)1.351.05–1.501,602–Less certain1, 7, 9
Crushed concrete (recycled)1.301.15–1.351,543–Less certain10, 11
Crusher run / ABC (compacted)1.901.76–2.002,254–Compacted3, 12
Crusher run / ABC (loose, by the truckload)1.501.25–1.751,780–Less certain7, 8, 13
Decorative / landscape rock1.351.25–1.451,602––4, 5
Mexican beach pebbles1.251.08–1.301,483–Less certain10, 14
Lava rock0.600.48–0.70712–Less certain7, 15, 16
Decomposed granite (DG)1.401.35–1.501,661–Less certain10, 13
Marble chips (white)1.301.15–1.351,543–Less certain15, 17
Slate chips1.101.01–1.221,305–Less certain15, 18
Crushed sandstone1.251.08–1.281,483––1, 15
Pumice0.600.50–0.76712–Less certain7, 15, 19
Play sand1.351.30–1.451,602+19%–2, 20
Paver / leveling sand1.351.30–1.451,602+19%–1, 20
Mason sand (fine)1.351.30–1.451,602+19%–1, 2
Concrete sand (coarse, washed)1.351.30–1.451,602+19%–1, 2
Fill sand1.351.30–1.451,602+19%–1, 2
River sand1.351.30–1.451,602+19%–1, 2
Sand, wet1.601.50–1.701,898––1, 2
Topsoil (screened)1.100.80–1.301,305+20%–1, 2
Garden soil / topsoil–compost blend0.850.75–1.101,009–Less certain10, 21
Fill dirt (unscreened)1.050.80–1.301,246+20%–1, 2, 22, 23
Packed earth, dug out1.281.25–1.351,519–Less certain1, 23
Clay (excavated)1.100.92–1.351,305+36%Less certain1, 2, 7, 22
Loam1.081.05–1.101,281+20%–1, 2, 22
Compost (screened)0.500.40–0.75593+50%–24, 25
Mulch (hardwood / bark)0.200.14–0.40237–Less certain1, 15
Wood chips (arborist)0.270.25–0.41320––15, 26, 27
Hot-mix asphalt (compacted)1.961.90–2.102,323–Compacted, less certain28, 29
Recycled asphalt millings (loose)1.251.20–1.601,483–Less certain10, 30
Cold patch (bagged)1.351.35–1.421,602–Compacted, less certain31
Broken asphalt chunks (demolition)0.650.61–0.70771–Less certain1, 32
Concrete (solid, poured)2.031.89–2.032,409–Compacted1, 15

The source numbers in the table refer to this list:

  1. Rockland Mfg — Weights of Materials
  2. Engineering ToolBox — dirt and mud densities
  3. Vulcan Materials — construction aggregates calculator
  4. Eartheasy — gravel density table
  5. Stone Centers — landscape gravel weights
  6. FHWA-HRT-15-034 Appendix A — aggregate min/max density
  7. New Mexico EMNRD — conversion factors for construction materials
  8. Kokosing Materials — tonnage calculator
  9. Angi — rip rap calculator
  10. Hello Gravel — product weights
  11. Construction Equipment — recycled concrete aggregate
  12. Ohio DOT CMS Item 304 — aggregate base
  13. Select Sand & Gravel — weight of crushed stone and DG
  14. Southwest Boulder & Stone Mexican beach pebble, 21.6 cu ft / 2,000 lb
  15. Engineering ToolBox — bulk material densities
  16. RockOn Landscape Center — red lava rock
  17. Vigoro 0.5 cu ft marble chips, 50 lb (retail listing)
  18. Pavestone 0.5 cu ft slate chips, 40 lb (retail listing)
  19. Hess Pumice — technical data sheet
  20. QUIKRETE Play Sand 0.5 cu ft / 50 lb (retail listing)
  21. GreenWaste — planter mix
  22. US Army FM 5-434 Earthmoving Operations, Tables 1-1 and 1-2 (soil conversion factors)
  23. Caterpillar Performance Handbook Ed. 29, weights of materials and load factors (Univ. of Washington copy)
  24. Oregon State Univ. Extension EM 9217 — compost analyses
  25. ILSR / WSU — compost bulk density activity
  26. Forest Products Journal — bulk density of wood fuels
  27. Minnesota PCA — wood chip properties
  28. Tennessee DOT IB 15-07 — HMA weights
  29. Pennsylvania Asphalt Pavement Assn. — checklist booklet
  30. HomeGuide — recycled asphalt millings
  31. QUIKRETE Asphalt Cold Patch data sheet
  32. Napa Recycling — C&D conversion sheet

How worked examples are tested

Every worked example on a calculator page is stored with the page as a set of inputs and expected results. An automated test feeds those inputs into the same code the calculator runs and compares the results. Expected values are written to four decimal places, and the test allows a difference of up to 0.005 for display rounding. If a formula or density changes and an example no longer matches, the test fails and the change does not go out until the page is corrected. Guides that show worked examples are checked the same way. The volume, roof and board-foot formulas also have their own tests with known answers, such as a 10 × 10 ft area at 4 in deep giving 1.23 cubic yards, and tests check that metric inputs give the same result as imperial ones.

The tables on this page, and many tables on the calculator pages, are built from the calculator code when the site is published, so a value changed in the code changes the table at the same time.

Prices

The calculators include no prices. Material, fuel and delivery costs change over time and vary by region, so a built-in figure would soon be wrong. Prices in our guides and on calculator pages come from a named source and carry the date we checked them, such as “checked November 2026”. Calculator pages list each source with the date we accessed it. When we update a price, we update the date as well. Use these prices as a rough guide and get a local quote before you order.

How pages are written and reviewed

Pages are drafted with help from AI tools, following a written guide. Every number in a draft must come from the calculator code or from a cited source, and the worked examples must pass the automated test above. Shashikant Yadav then reads and approves each page.

Until its guide has been reviewed, a calculator page shows the working calculator with a short introduction, and is kept out of search results and the sitemap. Guides are not published at all until they have been reviewed. The editorial policy describes the process in full.

Limits of these estimates

The results are estimates. Real material weight depends on moisture, grading and the supplier, so a ton of gravel from one yard can cover more or less ground than a ton from another. Ground is rarely flat and edges are rarely square. Some materials settle after spreading. Roofs have valleys, dormers and penetrations that a footprint does not capture. Before you order, ask your supplier how they sell the material and what it weighs, and for roof or structural work follow your local code. The disclaimer covers this in more detail.

Report an error

If a result, density or source looks wrong, email support@yardandfoot.com with the calculator, the numbers you entered and what you expected. We check each report against our sources, and if we made a mistake we fix the code or the page and update its date.