Menu

Search toolsChangelog

to move to openDescribe the problem, not the tool

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.

Sizes as the CSS Paged Media specification defines them. An inch is exactly 25.4 mm.

The side of one square. 5 mm is school graph paper; 6.35 mm is a quarter of an inch.

How thick a fine line is drawn. Under about 0.1 mm most inkjets render it unevenly.

Blank border on all four sides. Most desktop printers cannot print within about 5 mm of the edge.

Zero draws a plain grid with no heavy lines at all.

Squares on the sheet
2,090
Whole squares only. A partial square at the edge is not drawn.
Squares across
38
Squares down
55
Grid width (mm)
190.00
Grid height (mm)
275.00
First line from the left edge (mm)
10.00
First line from the top edge (mm)
11.00
Lines drawn
95
Of those, heavy
20
Total line length (m)
21.365
Page covered by ink
10.039%

The sheet

graph-paper-a4-5mm.svg · 1.4 KB

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

Vertical0100.5Heavy
Vertical1150.25Fine
Vertical2200.25Fine
Vertical3250.25Fine
Vertical4300.25Fine
Vertical5350.5Heavy
Vertical6400.25Fine
Vertical7450.25Fine
Vertical8500.25Fine
Vertical9550.25Fine
Vertical10600.5Heavy
Vertical11650.25Fine
What to take away
  1. 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.

  2. 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.

  3. 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.