Methodology & Accuracy
People use these calculators to pass exams and to cut lumber. Either way a wrong answer costs something, so this page sets out exactly how the tools compute their results, how we check them, and what we do when we get something wrong.
How results are calculated
- Standard formulas, shown on the page. Every calculator uses textbook relationships: the Pythagorean theorem, the sine, cosine and tangent ratios, the Law of Sines, the Law of Cosines and Heron's formula. The formula used is printed on the same page as the tool, so you can check any result by hand.
- Full precision inside, rounding only at the end. Calculations run in double-precision floating point (about 15 significant digits). Values are rounded only when displayed, so rounding errors do not compound between steps.
- Angles from the Law of Cosines where it matters. The inverse sine cannot tell an obtuse angle from its supplement. When a triangle may contain an obtuse angle we find it with the inverse cosine, which covers 0° to 180°.
- Ambiguous cases are shown, not hidden. Two sides and a non-included angle (SSA) can describe two different triangles. The Law of Sines calculator reports both.
- "Undefined" means undefined. tan 90°, sec 90°, csc 0° and cot 0° involve division by zero. We report them as undefined rather than as a very large number.
- Invalid inputs are rejected. Side lengths that break the triangle inequality, angles that sum past 180°, and a hypotenuse shorter than a leg produce an explanation instead of a result.
Rounding and units
- Decimal results are shown to 2–4 places depending on the tool. Exact forms such as 5√2 or √3/2 are given alongside decimals where they exist.
- Imperial lengths are rounded to the nearest 1/16 inch, carrying into inches and feet (5.99 in displays as 6 in, not 5 15/16 in).
- Trigonometry is unit-free: use any length unit, as long as every input uses the same one. Tools that assume a unit say so on the input label.
Diagrams
Result diagrams are drawn to scale from the computed values, so the picture is itself a check: a triangle labelled 30° should look like 30°. Static example diagrams are drawn to scale from the numbers in their labels, and an automated test compares the drawn proportions with the labelled values.
Building-code figures
Construction calculators quote limits from published model codes, cited on the page where they are used: the International Residential Code (IRC R311.7 for stairs), the International Building Code (IBC §1011), and the 2010 ADA Standards for Accessible Design (§405 for ramps). Model codes are adopted and amended locally, and structural sizing depends on loads these tools do not consider. Treat code checks here as a first pass and confirm with your local building department.
How we test
Every change to the site runs an automated test suite before it is published. The tests load the real calculator pages, type inputs, press Calculate and compare the displayed results with independently worked answers, including the awkward cases: obtuse triangles, the SSA ambiguous case, angles on the axes, negative angles and angles past 360°. Reference tables are generated from the same formulas as the calculators and checked numerically, and worked examples printed on a page are tested against the tool on that page.
Corrections
When we find an error we fix it, add a test so it cannot return, and list it in the public corrections log. If a result looks wrong to you, please tell us with the inputs you used. We check every report.
Limits
These are educational and estimating tools. They do not replace a licensed engineer, surveyor or architect. See the disclaimer.