LayoutMath is a set of free calculators for the jobs where a wrong number costs real money: decks, stairs, roofs, concrete, gravel and soil, asphalt, drywall, tile, lumber, squaring a layout and railings. It is an independent project, with no account, no app and no paywall.
Who runs LayoutMath
LayoutMath is an independent project built and maintained by Zain Rana (developer and builder) with technical trade and code review by Mark Reynolds (Residential Framer & Estimator with 18+ years of field experience in wood framing, stair layout and material takeoffs). Every calculator cites the relevant IRC and AWC sections and prints its full formula so you can verify every number before you cut or order.
Found a wrong result or have a calculator idea? Email us at hello@layoutmath.com — every message is read by hand.
Why it exists
A wrong count costs a second trip to the yard, and a wrong stair rise costs a failed inspection. Most online calculators return a number and stop there. LayoutMath prints the formula, shows the working, names the code section and lets you load a worked example, so you can check an answer instead of trusting it.
What is on the site
There are 23 calculators, grouped by the part of the job: the deck and its stairs and railings, the roof, the patio and drainage, concrete, gravel and sand, topsoil and mulch, asphalt, lumber, drywall and tile, and the layout and measuring that sit between them. There are also 24 guides. Each guide explains one question in depth, such as what a roofing square is, how deep a French drain should be or how to square a foundation, and sits beside the calculator it feeds.
Who it is for
LayoutMath is built for the person standing in a yard or on a site with a tape measure: a homeowner planning a weekend deck or a patio, a small contractor checking a quantity before writing a quote, and an apprentice or student learning how a rise, a pitch or a span is worked out. It works in feet and inches and in meters and millimeters, because the same job is measured differently in the US, Canada, the UK and Australia.
What every calculator page contains
- The inputs, with a units switch and an Try an example button that loads a worked case.
- The result as a buy list or a cut list, with Copy list and Copy link buttons so you can paste the numbers or reopen your exact inputs later.
- The formula, printed in full, and the reasoning behind it.
- Code checks that name the section they come from, so you can read the source.
- Answers to the questions people ask about that job, and the date the page was last reviewed.
How the numbers are made
Every formula is printed on its page. The worked examples and the figures in the guides are computed by the same code as the calculator, so the prose cannot drift from the result. The calculation code is covered by automated tests, including examples where the right answer is known by hand and cases where a simpler formula gets it wrong: the extra rise under a rafter tail, the gaps against a post, a joist span that looks fine by rule of thumb and fails the code table.
In practice a calculator goes through the same steps each time:
- The formula is written down from the code or standard it comes from.
- It is implemented once, in code that the calculator, its worked examples and its guides all share.
- Tests check known answers and the awkward cases, so a change that breaks a result fails the build.
- The page copy is read against the result, and the reviewed date is updated only when that has actually happened.
Codes and standards
Where a calculator checks against a code, the page names the section. Section numbers refer to IRC 2021 section numbers; England Approved Document K. Local jurisdictions adopt different editions and add amendments, so confirm with your building authority before you buy or cut.
The primary sources behind the pages: the International Residential Code 2021 on ICC Digital Codes, Approved Document K on GOV.UK and the American Wood Council's DCA 6 deck construction guide. Prices quoted in the cost guides come from named, dated third-party sources, never from invented statistics. The editorial policy explains how sources are chosen and how corrections are handled.
What this is not
These are planning estimates. They do not replace drawings, an engineer, or the code enforced where you build. Beam sizes, footing design, guard loads and drainage design are outside what a calculator like this should decide. The disclaimer sets out the limits in full.
Units
Enter feet and inches, fractions, millimeters or meters. The units default to your browser's region and you can switch them in the header. The choice is remembered on your device only.
Funding and independence
The site may display advertisements through Google AdSense to cover hosting and maintenance costs, and carries no affiliate links. It is not affiliated with any code body, lumber yard, manufacturer or retailer, so no result is steered toward a product.
Keeping pages current
Each page shows the date it was last reviewed. Code editions, section numbers and published price ranges change, so any page that quotes a price carries the date of its source and is re-checked at each review. If a page is reviewed and nothing needs to change, the date still moves; if something is wrong, the page is fixed first.
Corrections
If a result looks wrong, email hello@layoutmath.com with the page you were on and the numbers you entered. A wrong answer someone can reproduce is the most useful report there is. The contact page lists what to include.