# construction.materials-area
How many packs of a sheet or surface material to buy for an area: boxes of
tiles, tins of paint, sheets of plasterboard, packs of flooring. The caller
says what one pack covers in one coat; the answer is whole packs, rounded up,
and what will be left over.
## How it is worked out
1. The area and the pack coverage are each taken to the nearest whole square
centimetre (via `math.round-float` to 4 decimal places).
2. `area × coats × (1 + waste)` is worked out in integers and rounded **up**
to a whole square centimetre: that is `areaToCover`.
3. Packs are `areaToCover ÷ coverage`, rounded **up** (`math.round-div`).
4. `surplus` is `packs × coverage − areaToCover`.
The point of the integer detour is step 3. Dividing the floats and taking the
ceiling is the naive way and it is wrong in ordinary cases: 8.64 m² of wall
with 2.88 m² plasterboard sheets is exactly three sheets, but
`8.64 / 2.88` is 3.0000000000000004, and `ceil` buys a fourth. The same
happens with 2.1 / 0.3 and many other everyday figures.
## Using it
- **Tiles, flooring:** coverage is the m² per box as printed on it; coats 1.
Typical waste is 5% for plain layouts and 10-15% for diagonal or
herringbone, but that is the caller's decision.
- **Paint:** coverage is litres per tin × the manufacturer's m² per litre;
coats is the number of coats.
- **Plasterboard:** coverage is one sheet, e.g. 2.88 for 2400 × 1200.
It does not deduct openings (subtract them from the area first), or work out
tile layout and cuts: it is a quantity, not a setting-out plan.
Limits: area 0 to 1,000,000 m²; coverage 0.0001 to 100,000 m²; 1 to 10
coats; waste 0 to 10,000 basis points (0 to 100%). A zero area needs zero
packs.