An on-screen ruler you calibrate, so it is actually accurate.
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.
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.
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.
What this cannot tell you
Take this with you
Screen Ruler (px/cm/inch) on RunTheTests — free browser-based repair tools, no sign-up.