Most on-screen rulers just guess at 96 pixels per inch and call it a day. This one asks your screen — using a credit card or your display's real resolution — so the marks you see are the size they claim to be.
Every screen packs pixels at a different density, so pick a method below and match it against something real.
Pick your device from a known list. This uses the device's published resolution and screen size — precise for most factory displays, though a bit less exact than matching a card if yours has been resized or scaled unusually.
Enter your display's native resolution and diagonal size — usually findable in your device or monitor's specs. This is a good fallback when you don't have a card handy, though matching a card is more precise.
Quick conversions between millimeters, centimeters, and inches — no calibration needed for this part.
A true 15 cm ruler, with centimeters on top and inches on the bottom, sized to come out at exactly that length on paper — this uses your printer's physical page size rather than screen calibration, so set your printer to 100% scale — not "fit to page."
In the print dialog, set scale to 100% (or "Actual size") and disable any "fit to page" or "shrink to fit" option — otherwise the printed marks won't match real measurements.