Methodology
Every calculator on this site uses published formulas, states its assumptions and is covered by automated tests. This page collects them in one place.
Principles
- Show the work. Each tool prints its formula and a worked line for your own numbers.
- Round up, never down. Materials are rounded up to whole packages so you are not left short.
- No stale answers. If an input is missing or invalid, results are cleared until it is fixed.
- Units are converted, not approximated. 1 ft = 0.3048 m and 1 in = 25.4 mm exactly.
Roof pitch
pitch = ratio × 12 (shown as x/12)
angle = atan(ratio) × 180 ÷ π
slope % = ratio × 100
rafter multiplier = √(1 + ratio²)
Accepted range: 0/12 to 48/12, or 0° to 75°. Pitch is shown to two decimals, angle to two decimals, slope to one decimal and the multiplier to three. The advisory line uses the International Residential Code limits for asphalt shingles: below 2/12 not permitted, 2/12 to under 4/12 double underlayment (R905.2.2, R905.1.1). Above 9/12 is flagged as steep, which is our working threshold, not a code value.
Roofing materials
order area = roof area × (1 + waste %)
squares = order area ÷ 100 · bundles = ⌈squares × 3⌉
underlayment rolls = ⌈order area × layers ÷ roll coverage⌉
drip edge pieces = ⌈(eaves + rakes) ÷ (10 ft − 2″)⌉
- Every roof plane is assumed to share one pitch. For mixed pitches, calculate each section separately.
- Footprint is measured to the outside of the overhangs.
- Three bundles per square. Some heavier shingles use more; check the wrapper.
- Underlayment roll coverage is nominal (synthetic 10 squares, #15 felt 4, #30 felt 2). Two layers are counted from 2/12 to under 4/12.
- Drip edge: gable roofs have 2 eaves and 4 sloped rakes; hip roofs have eaves on all four sides. Pieces overlap at least 2″ (IRC R905.2.8.5).
- Not included: starter strip, ridge cap, flashing, vents, nails.
Fence
rails = sections × rails per section
pickets = ⌈length ÷ (picket width + gap)⌉
concrete per post = (π × (Ø ÷ 2)² − post²) × (hole depth − gravel)
bags = ⌈posts × concrete per post ÷ (bag weight × 0.0075 ft³/lb)⌉
- Straight runs; each corner adds one post. Gates are not included.
- Post widths are actual sizes: 4×4 = 3½″, 6×6 = 5½″.
- Bag yield of 0.0075 ft³ per lb matches common published yields (0.60 ft³ per 80 lb bag). Metric bags use the same ratio.
Deck
boards = ⌈rows × length × (1 + waste %) ÷ board length⌉
joists = ⌈length ÷ spacing⌉ + 1 · rim joists = 2
screws = rows × joists × 2
- Rectangular deck, boards square to the joists, two face screws per board at every joist.
- Framing sizes, beams, posts and footings are not calculated; they depend on span tables and local code (IRC R507).
Testing
All formulas live in a separate, pure code module with automated tests. Tests check reference values (for example 6/12 = 26.57° and a 1.118 multiplier, 12/12 = 45°), edge cases such as zero run, flat roofs and exact multiples, rounding, unit conversion and input validation. The site does not build if a test fails.
Formulas are shown on this page, based on the cited sources, and covered by automated tests.
Sources
- International Code Council, International Residential Code: R905.1.1, R905.2.2, R905.2.8.5 (roofing); R507 and Table R507.7 (decks).
- National Roofing Contractors Association, The NRCA Roofing Manual: Steep-slope Roof Systems.
- U.S. OSHA, 29 CFR 1926.501(b)(13), fall protection in residential construction.
- Manufacturer product data for shingle bundle coverage, underlayment roll coverage and concrete mix yield.
Corrections
If you think a result is wrong, send the Share link from the calculator to our contact page. We check every report and update both the tool and its tests when we find an error.