RunTheTests
/

Screen Ruler (px/cm/inch)

An on-screen ruler you calibrate, so it is actually accurate.

Step 1 — calibrate

Hold a bank card, driving licence or any ID-1 card against the screen and drag the slider until the outline matches its width exactly.

85.60 mm

Step 2 — measure

012345678910

Numbers are centimetres in millimetre mode and inches in inch mode. Zooming the page invalidates the calibration, so reset the zoom to 100% before measuring.

Result

CHECK

Calibrate against a bank card first

A browser has no way to know the physical size of your screen. The CSS specification fixes an inch at 96 CSS pixels whatever the display actually is, which is why an uncalibrated on-screen ruler can be badly wrong on a high-density laptop and worse on a phone. Matching the outline above against a bank card solves it, because the ID-1 card format is 85.60 mm wide everywhere in the world. Recalibrate if you move the window to a different monitor or change the browser zoom, since both change the relationship this measurement depends on.

Diagnostic telemetry
Calibration
not calibrated yet
Pixels per millimetre
3.785
Pixels per inch (CSS)
96.1
Approximate physical PPICSS pixels per inch multiplied by the device pixel ratio
96
Browser assumptionFixed by specification, and unrelated to your actual screen
96 CSS px per inch
Error if uncalibratedHow far out a ruler assuming 96 px per inch would be on this display
0%

What this cannot tell you

  • A browser cannot know the physical size of your screen. The ruler is only as accurate as the calibration you set against a card of known size.
  • Changing the browser zoom, or moving the window to a different monitor, invalidates the calibration. Reset zoom to 100% and recalibrate after either.
  • For anything where a millimetre matters, use a physical rule. This is for quick measurements, not for engineering.

Take this with you

How this calculation works

The CSS specification fixes an inch at 96 pixels no matter what display is attached, so a web page has no way to know how large a pixel really is. That is why most online rulers are wrong, sometimes by 20% or more on a high-density laptop. This one asks you to match an outline against a bank card instead, which works because the ID-1 card format is 85.60 mm wide everywhere in the world. The calibration is stored in your browser so you only do it once per display.

What the results mean

Pixels per millimetre
The measured scale of your display, derived from the card width. This is what turns screen pixels into real distance.
Approximate physical PPI
Pixels per inch of the actual panel, once the device pixel ratio is taken into account. Useful as a sanity check against the specification for your monitor.
Error if uncalibrated
How far out a ruler that assumed the standard 96 pixels per inch would be on this display. On many laptops it is substantial.

Common problems and fixes

The ruler was accurate and now it is not
Check the browser zoom first, since any change to it rescales everything and breaks the calibration. Moving the window to a second monitor does the same, because the two displays have different pixel densities. Reset zoom to 100% and calibrate again on the display you are actually measuring on.
The calibration does not persist between visits
It is saved in browser storage, which private browsing modes and some privacy settings clear or block. Nothing is lost beyond the convenience, and recalibrating takes a few seconds. If you use this often, keeping a normal window rather than a private one avoids repeating it.

Frequently asked questions

Why do I have to calibrate at all?

Because a browser genuinely cannot find out how big your screen is. It knows the pixel dimensions and nothing about the physical size, and the standard forces it to treat 96 pixels as an inch regardless. Every on-screen ruler that skips calibration is assuming a display you probably do not have.

Why a bank card?

Because it is the most widely available object with a guaranteed size. The ID-1 format under ISO/IEC 7810 is 85.60 by 53.98 mm, and it applies to bank cards, most driving licences and many identity cards worldwide. A ruler or a coin works too if you prefer, but the card is the one nearly everyone has to hand.

How accurate can this be?

Within about a millimetre over short distances if you calibrate carefully, which is fine for checking a screw length or a photo size. It is not a substitute for a physical rule, and error grows with the distance measured because any calibration mistake scales up along the length.

Put this on your own site

Free to embed, no attribution required beyond the source link the frame carries itself. It runs entirely in your visitor's browser, sets no cookies and loads no third-party script.

Embed code
<iframe src="https://runthetests.com/embed/screen-ruler/" width="100%" height="560" style="border:1px solid #e5e5e5;border-radius:8px" title="Screen Ruler (px/cm/inch)" loading="lazy"></iframe>

Preview it at https://runthetests.com/embed/screen-ruler/. Embedded pages are marked noindex, so yours stays the canonical copy — not this one.

More in Repair