Ruler on a phone · the geometry, stated

A ruler on your phone, calibrated the way a portrait screen allows

Every on-screen ruler that calibrates against a bank card asks you to lay the card's long edge across the glass. On a phone held upright that instruction is not merely awkward, it is impossible: the edge is 85.60 mm and the screen is about 58 to 71 mm across. This page is the arithmetic that follows from those two numbers, and the two ways round it — one that keeps the full reference and one that costs you a wider error band, with the cost written as a number rather than a warning.

Calibrationuncalibrated Referencenone matched px/mm3.780 assumed Error bandnone — not calibrated Unitmm Length shown120 mm assumed
0123456789101112
Scale

UNCALIBRATED — assumed 96 CSS ppi

This is not actual size yet. Match a bank card to make it so.

Half-millimetre marks are not drawn on this display — they would land 1.9 device pixels apart, and below 3 they blur into a grey band instead of reading as marks. This screen would need 153 ppi.

Match the outline to a card, upright

Hold any bank card, ID card or driving licence against the screen along the outline below and drag the slider until the two edges agree. On a screen that is taller than it is wide the page leads with the upright long edge — the full 85.60 mm reference, at ±1.2% — and prints a note saying that it chose, and why. Nothing here is a measurement of your phone until you confirm a match; the choice of edge is about which option fits, and it is reported rather than made behind your back.

324 px wide · steps of 1 px · 129–1369 px for this edge
Edge you are matching
How the card is held

The same record covers every ruler on this site that needs a calibration, so a match made here is a match made on the millimetre ruler and the inch ruler too; the screen ruler is not one of them, because it measures the screen's own layout and no calibration comes into it. A second object can be matched against it on the actual-size ruler, which reports the two answers as a percentage.

The problem, in one number

ISO/IEC 7810 fixes every bank card, ID card and driving licence at 85.60 by 53.98 mm. A phone in portrait gives a browser somewhere between about 58 and 71 mm of screen across — an iPhone SE is about 58 mm of usable screen, an iPhone 15 about 64, a 15 Pro Max about 71. Those are approximate figures for the screen area rather than the phone's body, and they are all smaller than 85.60 mm, so the standard instruction cannot be followed. A tool that offers only the horizontal match has therefore pushed every portrait visitor onto the 53.98 mm short edge without saying so, and the short edge carries a wider band.

The same phone is roughly twice as tall as it is wide. Take the screen width and the aspect ratio those screens are built to — 19.5:9 for a modern iPhone, 16:9 for the SE — and the implied height is far more than 85.60 mm in every case. That is the whole opening: the long edge fits, just not in the direction everyone points it.

PhoneScreen across (approx.)85.60 mm fits across?53.98 mm fits across?Implied down the screen85.60 mm fits upright?
iPhone SEabout 58 mmnoyesabout 103 mm at 16:9yes
iPhone 15about 64 mmnoyesabout 139 mm at 19.5:9yes
iPhone 15 Pro Maxabout 71 mmnoyesabout 154 mm at 19.5:9yes

The two right-hand columns are arithmetic, not measurements: screen width multiplied by the aspect ratio the panel is built to. They are here to show that the height is not marginal — the smallest of them clears 85.60 mm by 17 mm — not to tell you the size of your own phone, which this page has not measured and cannot.

Hold the card upright: the full long edge, ±1.2%

This is the mode to use, and it is the one the ruler starts you on when the screen it is running on is taller than it is wide. The card stands long-axis-up against the glass, the outline is drawn as a tall box rather than a wide one, and the reference stays the full 85.60 mm. The band that comes out is the long edge's:

0.351% + 0.818% = ±1.2%. The first term is how far a personalized card may sit from its nominal long edge under ISO/IEC 7810:2019. The second is 0.7 mm of human alignment slop expressed as a share of 85.60 mm. They are added rather than combined in quadrature, because a plus-or-minus sign reads as a bound.

Turning the card upright changes no arithmetic at all. The band belongs to the edge you matched and the care you took lining it up, not to the direction the outline points. What the orientation changes is which options fit on the screen in front of you — which, on a phone in portrait, is the difference between having the long edge and not having it.

Open the ruler with the upright long edge already selected. The link states the reference, the edge and the orientation, and the ruler refuses any of the three by name if it does not recognise it rather than quietly falling back to something else.

Or take the short edge: 53.98 mm, ±1.7%

The short edge fits across every phone in the table, and it is a legitimate match. It costs you accuracy, and here is the cost as a number rather than as a hedge: the same 0.7 mm of alignment slop is 1.59× larger in relative terms against 53.98 mm than against 85.60 mm. Add the short edge's own tolerance and the band goes from ±1.2% to ±1.7% — that is 0.371% + 1.297%.

In practical terms, on a 100 mm reading, ±1.2% is ±1.2 mm and ±1.7% is ±1.7 mm. The ruler prints whichever band you earned beside every reading, and it prints the comparison as a note the moment you match a short edge, so the choice is never invisible.

Open the ruler with the short edge already selected.

What a phone screen can draw that a monitor cannot

Phones are the one place where the graduations are not the problem. A half-millimetre mark needs 6.0 device pixels per millimetre — one pixel of line and two of clear gap, below which a comb of marks aliases into a flat grey band — which is 152.4 pixels per inch. A recent flagship phone is around 18 device pixels per millimetre, so half-millimetre marks are drawn there. A 24-inch 1080p monitor is 3.61 and a 27-inch 1440p is 4.28, and on those two the level is dropped and the omission is stated. The phone is the better instrument here; it is only the calibration step that needed rethinking.

What is measured, how it is kept, and what it cannot tell you

What is measured. One quantity, and you supply it: how many pixels a millimetre is on this display. A browser cannot ask the panel how large it is, and the CSS specification fixes an inch at 96 pixels whatever the hardware, so the ruler starts from an assumption and says so. Matching an outline to an object of known size replaces the assumption with a measurement. On a phone the object of known size is the same card as everywhere else — what changes is which of its edges is available, and in which direction.

How it is kept. What gets stored is device pixels per millimetre rather than CSS pixels per millimetre, so page zoom divides back out of it on Chrome, Edge and Firefox, and an operating-system display-scaling change does the same on Windows and on GNOME. Two cases are re-checked instead of corrected: Safari does not report page zoom through the pixel ratio, and on a macOS scaled resolution the factor lands in the reported pixel count. Turning the phone from portrait to landscape does not lose it either: the stored witnesses are normalised so that a rotation, which swaps the reported screen width and height, is not mistaken for a different display. Nothing is sent anywhere; the calibration sits in your own browser storage on this site alone.

What it cannot tell you. It cannot tell you the size of your phone before you have matched anything — the figures on this page are the card's dimensions and published screen sizes, not a measurement of the device you are holding. It cannot see that your card is bowed, and a card that has been sat on is no longer a straight edge. And no ruler in a browser can detect a swap to a different monitor of the same resolution, which is why the calibration is re-checked whenever the display reports something new rather than being treated as permanent.

Questions

Why will a bank card not fit across my phone screen?
Because the card is 85.60 mm along its long edge and a phone in portrait gives the browser about 58 to 71 mm of screen across — roughly 58 mm on an iPhone SE, 64 on an iPhone 15, 71 on a 15 Pro Max. The card is wider than the screen, so the usual instruction to lay it across the glass cannot be followed. Stood upright against the same screen the full 85.60 mm fits easily, because the screen is more than twice as tall as it is wide.
How do I calibrate a ruler on a phone in portrait?
Hold the card long-axis-up against the screen, so its 85.60 mm edge runs down the glass rather than across it, and drag the outline until the two ends line up with the card. That keeps the full long edge as the reference and the error band at 1.2 percent. The ruler starts a screen that is taller than it is wide on this mode and prints a note saying why, and you can pick either mode yourself at any point.
What does matching the short edge cost me?
The band widens from 1.2 percent to 1.7 percent. The reason is arithmetic rather than judgement: the same 0.7 mm of alignment slop is a larger share of 53.98 mm than of 85.60 mm, by a factor of 1.59, and the short edge's own dimensional tolerance is 0.371 percent against the long edge's 0.351. On a 100 mm reading that is the difference between 1.2 mm and 1.7 mm of uncertainty.
Can I just turn my phone sideways instead?
Yes, and in landscape the long edge fits across the screen in the ordinary way. Rotating does not cost you a calibration you already made either: the stored figure is device pixels per millimetre and the environment witnesses are normalised so that a rotation, which swaps the reported screen width and height, is not read as a different display. The upright mode exists so that you do not have to rotate in the first place.
Are half-millimetre marks drawn on a phone?
On a recent phone, yes. A half-millimetre graduation needs 6.0 device pixels per millimetre to leave one pixel of line and two of gap, which is 152.4 pixels per inch, and a modern phone panel is far above that at roughly 18 device pixels per millimetre. Most desktop monitors are below it, so the level is dropped there and the omission is reported rather than drawn anyway.

Where to go next