How the Square Footage Calculator works

Every formula, constant and rounding rule the calculator uses, and what it does not do. The math is in one file (core.js) with 55 tests whose expected numbers were worked out by hand.

Lengths

Shapes

ShapeArea
Rectanglelength × width
L-shapetotal length × total width − cut-out length × cut-out width (the cut-out must be shorter and narrower than the whole)
Triangle (base and height)base × height ÷ 2
Triangle (3 sides)Heron’s formula: s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)); sides that cannot close a triangle are an error
Circleπ × (diameter ÷ 2)²
Half circleπ × (diameter ÷ 2)² ÷ 2
Trapezoid(parallel side 1 + parallel side 2) ÷ 2 × height
Ovalπ × length × width ÷ 4
Room walls2 × (room length + room width) × wall height

Area units

UnitSquare feet
Square inch1/144
Square yard9
Square meter1 ÷ 0.09290304 = 10.7639104
Acre43,560
Hectare10,000 m² = 107,639.104

Results are shown rounded (2 decimals for most units, more for acres and hectares); the math keeps full precision until the end.

Materials

Waste is added on top of the measured area before anything is counted. Anything you buy whole (boxes, tiles, sheets, bags, bundles, gallons, pallets) is rounded up. Every default below can be changed in the calculator.

UseDefault wasteHow it is counted
Flooring10%area + waste; boxes = that ÷ square feet per box (from the box label); cost = boxes × box size × price per sq ft
Tile10%tiles = (area + waste) ÷ (tile width × tile length ÷ 144); boxes = tiles ÷ tiles per box
Carpet10%square yards = (area + waste) ÷ 9; cost per square yard
Paint0%wall area − 21 sq ft per door (3 × 7 ft) − 15 sq ft per window (3 × 5 ft); gallons = wall area × coats ÷ coverage (default 350 sq ft per gallon, 2 coats)
Drywall10%sheets = (area + waste) ÷ sheet area (4 × 8 = 32, 4 × 10 = 40, 4 × 12 = 48, 4.5 × 12 = 54 sq ft)
Concrete10%cubic yards = area × thickness (in) ÷ 12 ÷ 27, default 4 in; bags at 0.6 cu ft per 80 lb, 0.45 per 60 lb, 0.3 per 40 lb bag
Mulch, gravel or soil0%cubic yards = area × depth (in) ÷ 324, default 3 in; bags = cubic feet ÷ bag size (default 2 cu ft)
Sod5%area + waste; pallets = that ÷ square feet per pallet (from your supplier)
Roofing10%roof area = footprint × √(1 + (pitch ÷ 12)²); squares = (roof area + waste) ÷ 100; bundles = squares × bundles per square (default 3)

Where the defaults come from:

Price per square foot

House square footage

The house page summarises the ANSI Z765 standard (finished area measured from the outside walls, ceilings of at least 7 ft, nothing under 5 ft, basements reported separately, garages excluded). It is a summary from public fact sheets, not the standard itself; appraisers use the full text.

What the calculator does not do

Sources

Privacy

All math runs in your browser. Nothing you type is sent to a server. The last calculation on each page is saved in your browser’s local storage (keys starting with sfc:). A shared link stores the calculation after the # in the link, which browsers do not send to the server.

Open the square footage calculator