5 mm graph paper on A4, square by square
With a 10 mm margin all round, a sheet of A4 holds 38 squares across and 55 down — 2,090 whole 5 mm squares. The width divides exactly: 190 mm of printable width is 38 squares with nothing left over. The height does not: 277 mm of printable height is 55 squares and 2 mm spare, so a centred grid starts 11 mm from the top edge rather than 10 mm. With no margin at all the sheet takes 42 across and 59 down, or 2,478 squares.
The sheet
Vector, dimensioned in millimetres, so it prints at true scale on any printer. Print it from here to skip the page furniture, or save it and open it in anything.
Every line on the sheet
| Vertical | 0 | 10 | 0.5 | Heavy |
| Vertical | 1 | 15 | 0.25 | Fine |
| Vertical | 2 | 20 | 0.25 | Fine |
| Vertical | 3 | 25 | 0.25 | Fine |
| Vertical | 4 | 30 | 0.25 | Fine |
| Vertical | 5 | 35 | 0.5 | Heavy |
| Vertical | 6 | 40 | 0.25 | Fine |
| Vertical | 7 | 45 | 0.25 | Fine |
| Vertical | 8 | 50 | 0.25 | Fine |
| Vertical | 9 | 55 | 0.25 | Fine |
| Vertical | 10 | 60 | 0.5 | Heavy |
| Vertical | 11 | 65 | 0.25 | Fine |
A4 is 210 mm wide, which 5 mm divides exactly 42 times, so the horizontal fit is always clean whatever margin you choose in whole millimetres.
297 mm is not a multiple of 5, so there is always a remainder down the page. Centring splits it, which is why the top margin comes out 1 mm larger than the one you asked for.
Ten millimetres is about the smallest margin worth asking for: most desktop printers have a hardware border of 4 to 6 mm they physically cannot reach.
How it works
The formula
printableWidth = pageWidth - 2 x margin
printableHeight = pageHeight - 2 x margin
across = floor(printableWidth / spacing)
down = floor(printableHeight / spacing)
gridWidth = across x spacing
gridHeight = down x spacing
centred: firstLineX = margin + (printableWidth - gridWidth ) / 2
firstLineY = margin + (printableHeight - gridHeight) / 2
top-left: firstLineX = firstLineY = margin
verticalLines = across + 1
horizontalLines = down + 1
a line is heavy when every > 0 and index mod every = 0
heavyVertical = floor(across / every) + 1
lineLength = verticalLines x gridHeight + horizontalLines x gridWidth
Wv = total width of the vertical strokes, capped at gridWidth
Wh = total height of the horizontal strokes, capped at gridHeight
inkArea = Wv x gridHeight + Wh x gridWidth - Wv x Wh
coverage = inkArea / (pageWidth x pageHeight)
Every length above is held as a whole number of micrometres.
What it assumes
- Every length is held as a whole number of micrometres, a thousandth of a millimetre, because the answer turns on a floor division and a floating-point millimetre gets that wrong by an entire column. On A4 with a 6 mm margin and 4.4 mm squares, 198 divided by 4.4 evaluates to 44.99999999999999, so a naive implementation reports 44 squares where there are 45.
- Only whole squares are counted. A partial square in the leftover strip is not drawn and not included, because a grid that ends in a sliver is what makes printed graph paper look wrong.
- Ink coverage treats each stroke as centred on its line and entirely on the paper. At a zero margin the outermost line loses half its width over the edge, so the figure is a fraction of a per cent high there.
- Paper sizes are trimmed sizes. Your printer's own hardware margin, usually 4 to 6 mm, is not deducted, so a margin below about 5 mm may be clipped by the printer rather than by the page.
- Every millimetre here assumes the sheet is printed at 100%. Browsers and print dialogues default to fitting the page, which shrinks everything by two or three per cent and makes 5 mm squares measure 4.9.
Common questions
Why is the usable area smaller than 210 × 297 mm?
Because almost no consumer printer prints to the edge. A typical unprintable margin is 3 to 5 mm on three sides and up to 15 mm on the trailing edge, so the grid is inset to sit inside it. Setting a margin smaller than the printer’s own gains you nothing.
Does 5 mm paper match the squared paper sold in shops?
In Europe, yes — 5 mm is the standard for school exercise books, with 10 mm for younger years. American quadrille paper is a quarter of an inch, which is 6.35 mm, so the two are visibly different and will not overlay.
Sources
The full method, worked example and every assumption behind this figure are on Printable Graph Paper Planner.