Methodology: every formula, constant and source

By Rohit GaurLast updated October 11, 2026Report a mistake

A calculator is only worth using if you can check it. This page lists the formula behind every shape, the exact value behind every unit, the rounding rules, and the tests that keep them honest. The tables below are generated from the calculator’s own code at build time — nobody retypes a number into this page, so what is published and what runs cannot drift apart.

Formulas

Rectangle

Area
length × width
Perimeter
2 × (length + width)

Square

Area
side × side
Perimeter
4 × side

L-shape

Area
length × width − cut-in length × cut-in width
Perimeter
2 × (length + width)

Cutting a rectangular corner out leaves the perimeter unchanged: the two new inner edges are exactly as long as the outer edges they replace.

Triangle (base and height)

Area
base × height ÷ 2

Height is the perpendicular distance to the base, not the length of a side. Two numbers do not determine the three sides, so no perimeter is shown.

Triangle (three sides)

Area
¼ √( (a + (b + c)) · (c − (a − b)) · (c + (a − b)) · (a + (b − c)) ), sides sorted a ≥ b ≥ c
Perimeter
a + b + c

Kahan's rearrangement of Heron's formula. The textbook form subtracts nearly equal numbers on thin triangles and loses most of its digits; this grouping does not.

W. Kahan, University of California, Berkeley: Miscalculating Area and Angles of a Needle-like Triangle

Circle

Area
π × radius² (× ½ for a half, × ¼ for a quarter)
Perimeter
2π × radius, plus 2 × radius for the straight edge of a half or quarter

Trapezoid

Area
(side A + side B) ÷ 2 × height
Perimeter
side A + side B + both slanted sides, when they are given

Parallelogram

Area
base × height
Perimeter
2 × (base + slanted side), when the slanted side is given

Height is again the perpendicular distance, which is why a parallelogram and a rectangle of the same base and height have the same area.

Four walls + diagonal

Area
the two triangles the diagonal makes, each by Kahan's formula, added
Perimeter
wall A + wall B + wall C + wall D

Four walls do not describe a shape — the same four enclose less area the more the room leans — so a diagonal is measured too, and it splits the room into two triangles whose sides are all known. Measure the other diagonal as well and the room is described twice over: the difference between the second diagonal and the one the first five numbers imply is how far out of square the corners are.

W. Kahan, University of California, Berkeley: Miscalculating Area and Angles of a Needle-like Triangle

Drawn shape

Area
½ |Σ (xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ)| — the shoelace formula
Perimeter
the sum of the edge lengths

Points are taken relative to the first corner and summed with compensated arithmetic, and the outline is rejected if it crosses itself, using an exact orientation predicate.

J. R. Shewchuk, University of California, Berkeley: Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry

Conversion constants

These are definitions, not measurements: an inch is 25.4 millimetres, exactly, by international agreement. The calculator converts through exact integer ratios rather than through these decimals, so 12 inches is exactly 1 foot and 1 acre is exactly 43,560 square feet with no floating-point dust.

Length

1 unitexactlyin
mm0.001m
cm0.01m
m1m
km1000m
in0.0254m
ft0.3048m
yd0.9144m
mi1609.344m

NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement · Special Publication 811, Appendix B: Conversion factors · U.S. Survey Foot: Deprecation

Area

1 unitexactlyin
mm²0.000001m²
cm²0.0001m²
m²1m²
km²1000000m²
in²0.00064516m²
ft²0.09290304m²
yd²0.83612736m²
mi²2589988.110336m²
ac4046.8564224m²
ha10000m²

NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement · Special Publication 811, Appendix B: Conversion factors · U.S. Survey Foot: Deprecation

Volume

Volume units are here because the material estimators use them.

1 unitexactlyin
cm³0.000001m³
m³1m³
in³0.000016387064m³
ft³0.028316846592m³
yd³0.764554857984m³
L0.001m³
US gal0.003785411784m³
imp gal0.00454609m³

NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement · Special Publication 811, Appendix B: Conversion factors · U.S. Survey Foot: Deprecation

The United States survey foot is deliberately absent. NIST retired it on 31 December 2022, and since 1 January 2023 the international foot — exactly 0.3048 metres — is the only foot in use.

Land units of South Asia

These are not definitions the way an inch is. A bigha is whatever a particular state’s land records say it is, and the same word means 14,400 square feet in West Bengal and 9,075 in the bigha-biswa districts of Haryana. So every one below carries the government document it was read from and the date somebody opened it, and the converter makes you pick a region before it answers.

Where a source calls its own figure approximate — Bihar’s glossary on the kattha, Bangladesh’s Ministry of Land on the katha and bigha — the tables here and the converters both say so with a ≈ rather than printing four decimals of false precision.

India

UnitWhere the land isft²m²Source and definition
GajAcross India90.84NIST1 gaj = 1 square yard = 9 sq ft
CentAcross India435.640.47MDDS1 acre = 100 cents, so 1 cent = 435.6 sq ft
GunthaAcross India1,089101.17MDDS1 acre = 40 gunthas, so 1 guntha = 121 sq yd = 1,089 sq ft
BighaWest Bengal14,4001,337.8NGDRS1 bigha = 20 katha = 14,400 sq ft
BighaAssam14,4001,337.8Guwahati bylaws1 bigha = 5 katha = 14,400 sq ft
BighaHaryana9,075843.1MDDS4 bigha 16 biswa = 1 acre, so 1 bigha = 9,075 sq ft
KathaWest Bengal72066.89NGDRS1 katha = 720 sq ft, and 20 katha = 1 bigha
KathaAssam2,880267.56Guwahati bylaws1 katha = 20 lessa = 2,880 sq ft
KathaBihar (Patna)≈ 1,361≈ 126.44Bihar revenue glossary1 kattha ≈ 1,361 sq ft in and around Patna
KathaJharkhand≈ 720≈ 66.89MDDS1 katha = 66.89 m² ≈ 720 sq ft
BiswaHaryana453.7542.15MDDS1 bigha = 20 biswa, so 1 biswa = 453.75 sq ft
MarlaHaryana and Punjab272.2525.29MDDS8 kanal = 1 acre and 20 marla = 1 kanal, so 1 marla = 272.25 sq ft
KanalHaryana and Punjab5,445505.86MDDS8 kanal = 1 acre, so 1 kanal = 20 marla = 5,445 sq ft
LessaAssam14413.38MDDS1 lessa = 144 sq ft
ChatakWest Bengal454.18NGDRS1 chatak = 45 sq ft, and 16 chatak = 1 katha
DhurBihar (Patna)≈ 68.05≈ 6.32Bihar revenue glossary1 dhur = 1/20 kattha ≈ 68.05 sq ft around Patna
KaniTripura17,2801,605.36Tripura land records20 ganda = 1 kani = 17,280 sq ft
GondaTripura86480.27Tripura land records4 kara = 1 ganda = 864 sq ft
KoraTripura21620.07Tripura land records3 kranta = 1 kara = 216 sq ft

Bangladesh

UnitWhere the land isft²m²Source and definition
CentBangladesh≈ 435.6≈ 40.47Bangladesh Ministry of Land1 decimal (shotangsho) ≈ 435.6 sq ft
KathaBangladesh≈ 720≈ 66.89Bangladesh Ministry of Land1 katha ≈ 720 sq ft, and 16 chatak = 1 katha
BighaBangladesh≈ 14,400≈ 1,337.8Bangladesh Ministry of Land20 katha = 1 bigha ≈ 14,400 sq ft
ChatakBangladesh454.18Bangladesh Ministry of Land1 chatak = 45 sq ft
KaniBangladesh17,2801,605.36Bangladesh Ministry of Land1 kani = 20 gonda = 17,280 sq ft
GondaBangladesh86480.27Bangladesh Ministry of Land4 kora = 1 gonda = 864 sq ft
KoraBangladesh21620.07Bangladesh Ministry of Land3 kranti = 1 kora = 216 sq ft

Three units people ask for are deliberately missing: Rajasthan’s bigha (two jaribs, one source), Pakistan’s marla (225 square feet in Lahore’s planned schemes against 272.25 on the old records, and no government copy of the rules we could open on 21 September 2026), and the Tamil Nadu ground of 2,400 square feet, which is quoted everywhere and stated in no document we could find. A land unit is worth more missing than wrong.

Garden materials: volume, compaction and weight

The mulch, gravel and topsoil calculators share one piece of arithmetic, and it is short:

MaterialTons (2,000 lb) a cubic yardTonnes a cubic metrePounds a cubic footSource
Gravelloose, as delivered1.621.92120Penn State DSA handbook
Topsoildry, in place1.121.3383.03Penn State Extension

Compacting: a depth given as finished is ordered 1.333 times as deep — the handbook's 8 in loose lift for 6 in finished. It is the only compaction ratio any source here gives, so it is the one used for every compacted depth.

MaterialDepths offered, and what forSource
Mulch
  • 2 in (5 cm) — fine or matting
  • 3 in (7.5 cm) — wood and bark
  • 4 in (10 cm) — coarse nuggets
Gravel
  • 1 in (2.5 cm) — decorative, over a bed
  • 4 in (10 cm) — paver base, compacted
  • 6 in (15 cm) — drive or road, compacted
Topsoil
  • 4 in (10 cm) — new lawn, the least
  • 6 in (15 cm) — new lawn
  • 8 in (20 cm) — raised bed: greens, beans, cucumbers
  • 12 in (30 cm) — raised bed: tomatoes, peppers, squash

The cubic yard calculator is the same arithmetic over several sections: each is a rectangle (length × width), a circle (π × half its width squared), a triangle (half its base × its height) or an area already known, times its own depth; the sections are added with compensated summation, and the extra, the weight and the bags are worked out on the total.

Sod has no depth. The sod calculator orders the lawn’s area plus the extra, counts pieces and pallets as whole things with the same slack as every other count, and weighs the order at the University of Tennessee’s figure — about a ton for a pallet of about 50 square yards — which is a figure for planning a delivery, not a scale: wet sod weighs more.

Building: pavers, concrete, the roof, the deck, insulation and siding

Rounding

How the maths is tested

Every formula has unit tests with fixed, checkable cases: a 12 × 12 room is 144 square feet, a 3-4-5 triangle is 6 square units, a 20 × 10 room with an 8 × 4 corner taken out is 168.

On top of those, property tests run each formula against thousands of random inputs and check statements that must hold for every one of them:

That last one is the reason the diagrams can be trusted as drawings rather than decoration: a room that draws differently from the way it calculates fails the build.

Measuring a whole house (ANSI Z765)

The house calculator follows ANSI Z765, the square-footage method Fannie Mae has required for appraisals with effective dates from 1 April 2022. These are the rules it applies, and where each was read:

Rule As applied here
Finished area needs a ceiling of 7 ft (2.13 m); 6 ft 4 in (1.93 m) under beams, ducts and other obstructions; no requirement under stairs A room with a flat ceiling below the height is reported separately, as nonstandard finished area
Where the ceiling slopes, at least half of the room must be 7 ft or higher, and no part under 5 ft (1.52 m) counts The part under 5 ft is deducted first; if less than half of what remains is at full height, the whole room is reported separately rather than counted
Above-grade finished area is the sum of finished areas on levels entirely above grade; below-grade finished area is the sum on levels wholly or partly below grade The two are shown separately and never added
“No statement of a house’s finished square footage can be made without the clear and separate distinction of above-grade areas and below-grade areas” The summary refuses to print one total
Openings to the floor below are not counted; stair treads and landings descending through them count on the floor they descend from, up to the area of the opening Entered per space, applied exactly
Garages and unfinished areas are not finished square footage; areas not connected to the house through finished space are not either Listed separately with the reason
A finished area attached to the house with no direct access from inside it is noncontinuous finished area (Fannie Mae’s ANSI FAQ, Q18) Listed on a line of its own, apart from the totals and from the nonstandard rooms
Measured at floor level to the exterior finished surface of the outside walls (detached), or to the centrelines between houses where appropriate (attached) Said on the page; the figures you type are assumed to be measured that way
Reported to the nearest whole square foot, or the nearest 0.1 m² in SI units Rounded once, at the end

Where these came from, and what is missing. The official copy of ANSI Z765-2021 (Home Innovation Research Labs, USD 25) has not been bought. The rules above were read in Fannie Mae’s Selling Guide B4-1.3-05, which requires the standard and restates parts of it, and in a published slide deck from an Appraisal Institute chapter that reproduces the standard’s own wording, including its section numbering for rounding and reporting (PDF, opened 22 September 2026). A copy of the standard hosted by an MLS was found but is an encrypted PDF, and we did not try to open it. Since 11 October 2026 the rules have also been checked against Fannie Mae’s ANSI FAQ (September 2025) and the standard’s free public draft of February 2020, which Home Innovation says the 2021 edition changed mainly in its commentary; the house square footage guide lists every source.

Until the official copy is read, treat this page as what it is: a careful implementation of a standard we have read about rather than read. An appraisal that has to cite the standard should be checked against the standard.

What this calculator does not do yet

Corrections

If a number here is wrong, that is a bug and it will be fixed. Write to contact@sqftmath.com with the page and the measurement you used, and the correction will be dated when it ships.

Open the calculator