Independent and evidence-first: we don't take payment from contractors or sell your details. How we work

How CostSquared calculates

Every CostSquared result can be traced to a formula on this page and the inputs you gave, and, once we publish them, to documented prices. If a number can't be traced, we don't show it.

Current data status

No price ranges are published yet.We are collecting documented prices, but none has yet met the standard below. Until one does, our tools work from geometry and the numbers you enter, and the quote checker checks arithmetic, quantities and scope, not price levels.

When we publish a price range

A price only means something with its basis (materials only, labor only, or installed), its unit, the scope it covers, the place it applies to and the date it was observed. Every observation we record keeps the product or scope, unit, date, location and supporting evidence. We publish a range only when:

  • it is built from at least 3 valid observations (government-published statistics excepted);
  • a range labelled national includes observations from at least 3 of the 4 US Census regions;
  • for medium confidence on materials: at least 8 observations from at least 2 retailers across 3 regions, none older than 6 months — with 3 to 7 observations we show only the lowest and highest prices, with no "typical";
  • for contractor labor or installed prices: at least 10 independent contractor responses for one clearly defined scope and area, none older than 12 months;
  • every source allows us to use it, prices are recorded by hand from public listings (no scraping), and each observation keeps its date and evidence;
  • a review has been completed, has waited at least 24 hours, and the owner has approved publication.

We don't convert roofer wages into labor prices: a contractor's charge also covers insurance, equipment, overhead and profit. When data for a state is thin, a published range will say which area it comes from: the census division, region or national level.

When ranges are published, money will be calculated in whole cents, ranges will be rounded outward so rounding never makes them look narrower, and any sum with an unpriced item will be labelled a subtotal that lists what is missing.

Formulas

Roof pitch (version 1.1.0)

  • Pitch (X/12) = 12 × rise ÷ run; angle = arctan(rise ÷ run) in degrees; slope = 100 × rise ÷ run.
  • Roof-area multiplier (pitch factor) = √(rise² + run²) ÷ run, calculated from rise and run directly and rounded once to 6 decimal places. For X/12 it equals √(1 + (X/12)²).
  • Hip and valley factor = √(rise² + 2 × run²) ÷ run. It gives the length of a hip or valley rafter per unit of common run where two planes of the same pitch meet at a right angle in plan. It is a length factor, not an area multiplier, and doesn't apply to unequal pitches or corners that aren't square.
  • Rafter length = common run × pitch factor; hip or valley length = common run × hip and valley factor (before overhangs).
  • Inputs: rise and run (any one unit), angle up to arctan(4) ≈ 75.96°, or percent slope up to 400%. Supported range 0/12 to 48/12; we warn above 24/12 and at 0/12. The browser preview uses the same formulas; the server result is the one that counts.

These are the formulas the roof pitch calculator uses.

Roof area and squares

  • Footprint = (wall length + both rake overhangs) × (wall width + both eave overhangs) for a simple rectangle.
  • Roof area = footprint × pitch factor, for roof planes that share one pitch. Sections with different pitches are calculated separately and added.
  • Squares = roof area ÷ 100. Shingle waste is added to the shingle order only, never to roof area.

The measuring guide's worked example applies each step to a real set of numbers.

How the quote checker works (version 1.0.0)

  1. Pasted text is split into lines. Amounts are read only when marked with $ or USD, or written after @, x, × or =. Quantities are read with their units; "sq" is read as roofing squares and flagged for you to confirm. Lines starting "Total", "Subtotal", "Tax", "Deposit" or "Balance" are treated as summary lines.
  2. We suggest what each line is about from keywords. You confirm or change every line; nothing is checked until you do.
  3. Arithmetic: quantity × unit price must match the line total within $1 or 0.5%, whichever is larger. Lines must add up to the quote's total within $1.
  4. Quantities: shingle and tear-off quantities are compared with the roof size you enter.
  5. Missing items: we list only items for which we have checked a published code source.

The checker uses fixed rules, not AI. It doesn't compare prices, and it never says a quote is unfair or a contractor is overcharging. What you enter isn't stored or logged. You can try the quote checker, or read how to read a roofing quote first.

Review and publication

  1. Formulas are written in a specification, implemented once on the server, and tested against values worked out independently, including edge cases such as zero rise and the steepest supported pitch.
  2. Prices are recorded by hand with their evidence, checked against the thresholds above, reviewed, left for at least 24 hours, and published only with the owner's approval as a numbered data release.
  3. Code and safety statements link to the official document we read, with the date we read it. A rule from one city or state is presented as an example, not a national rule.

Sources we cite

  • Roof Assemblies (Chapter 9, Michigan Residential Code) — City of Grand Rapids, Michigan. Read October 21, 2026. Asphalt shingles only on slopes of 2:12 or steeper (R905.2.2); two layers of underlayment on slopes from 2:12 up to 4:12 (R905.1.1); ice barrier where there is a history of ice damming, from the eave to at least 24 inches inside the exterior wall line (R905.1.2); flashing at wall–roof intersections, slope changes and roof openings (R903.2.1); existing coverings must be removed when the roof already has two or more layers (R908.3).
  • Residential Asphalt Shingle Requirements — City of Des Moines, Iowa — Permit & Development Center. Read October 21, 2026. Applies the 2021 International Residential Code: 2:12 minimum slope for asphalt shingles, double underlayment from 2:12 to 4:12, ice barrier extent, and re-cover limits. Also shows that permit rules are local: in Des Moines a reroof needs no permit unless sheathing or rafters are repaired or replaced.
  • Asphalt Shingle Installation (based on the 2022 Connecticut State Building Code) — City of Meriden, Connecticut — Building Division. Read October 21, 2026. Metal drip edge at eaves and rakes (R905.2.8.5), ice barrier extent (R905.1.2), and the 2:12 minimum slope for asphalt shingles (R905.2.2).
  • Roofing and re-roofing with asphalt shingles (handout, last updated May 2016) — City of Minneapolis, Minnesota — Construction Code Services. Read October 26, 2026. Under the Minnesota Residential Code cited in the handout: asphalt shingles need a slope of 2:12 or more; slopes from 2:12 to 4:12 need double underlayment; a building permit is required for all re-roofing except repairs of less than one bundle; one overlay over a single existing layer is allowed under listed conditions; adding ventilation to an existing home is not required when re-roofing. The handout is dated 2016, so check the current edition.
  • How Many Bundles of Shingles Are in a Square? — GAF (shingle manufacturer). Read October 26, 2026. A roofing square is 100 square feet of roof area; standard asphalt shingles usually come three bundles to the square (some products need more); contractors usually add a 10–15% waste factor.
  • Important Contract & Payment Rules (publication 13P-106) — Contractors State License Board, State of California. Read October 26, 2026. In California, a down payment on a home improvement contract may not exceed $1,000 or 10% of the contract price, whichever is less.
  • Census Bureau Regions and Divisions with State FIPS Codes — U.S. Census Bureau. Read October 21, 2026. Which states belong to each census division and region — used for geography levels.

Building codes are adopted and amended locally. The city pages above are examples of adopted residential codes, not the rule in every place; your local building department has the final word.

Versions and changes

ToolVersion
roof-pitch1.1.0
quote-checker1.0.0

Versions change when a formula or validation rule changes. Results always show the version used.

  • Roof pitch 1.1.0 (October 26, 2026): the angle limit is now exactly arctan(4) ≈ 75.96°, the steepest angle of 48/12. Before, an angle such as 75.964° passed the angle check but was then rejected as steeper than 48/12, with the message attached to a field that wasn't on screen. It is now rejected with the message next to the Angle box. Hip or valley length is shown when a common run is entered. Formulas and earlier results are unchanged.

Limitations and corrections

  • The guides and code references focus on asphalt shingle roofs.
  • Results are informational and are not bids. Real prices depend on conditions contractors assess on site.

Found a mistake? Tell us and choose "A calculation or data problem". We fix confirmed errors and note significant corrections on this page.