An on screen ruler lets you measure things shown on a display: a photo, a PDF, a print preview or a product image. It measures in real centimeters and inches, or in pixels. The key is calibration. Once the ruler is matched to a known object, like a credit card, its ticks are a ruler on screen at actual size. Then you can measure an image the same way you’d measure paper.

One practical point first: a web page can’t draw on top of other apps or tabs. So to measure content on a screen, you either put the ruler beside the content, or run it on a second device. Both are covered below.

Two kinds of “image size”

Before measuring, decide which size you need.

You want… Measure in Example
How big it looks on this screen mm, cm, inches “Is this label preview 5 cm wide?”
How big it is digitally CSS pixels or image pixels “Is this banner 728 px wide?”
How big it will print mm/in, at 100% print preview “Will this photo fit a 4×6 frame?”

ruleronphone shows a primary and a secondary unit side by side, so you can read cm and pixels at the same time.

Four ways to measure on screen

Setup Works on Best for
A. Ruler window beside the content Desktop and laptop Print previews, images, PDFs
B. A second device held against the screen Any screen Monitors, TVs, another phone
C. Physical item on the ruler Phone, tablet Prints, labels, photos, cards
D. Browser DevTools Desktop Exact CSS pixel sizes of web elements

A. Ruler window beside the content (desktop)

  1. Calibrate once on the monitor you’ll measure on. Open the online ruler, choose Card or A4/Letter, match the reference and tap Apply. (Full guide.)
  2. Resize the ruler window so it’s narrow, and move it next to the window that shows your image or PDF. Windows: drag it, or use Win + ← / → to snap. Mac: drag, or hold the green button for tiling.
  3. Keep zoom at 100% in both windows.
  4. Line up the ruler’s edge ticks with the image’s top or left edge and read the far edge.

This works because both windows are on the same calibrated screen. If you drag the ruler to a different monitor, recalibrate there.

B. A second device held against the screen

Calibrate the ruler on your phone, then hold the phone’s edge against the monitor, TV or tablet you’re measuring. Read the item’s edges off the phone’s tick marks. Keep the two screens touching and look straight on, because any gap causes parallax.

C. Physical item on the ruler

To check a printed photo, label or sticker, lay it directly on the calibrated screen and use Select mode: drag a box over its edges to get width, height, diagonal and area. Tap to copy the reading and paste it wherever you need it.

D. Browser DevTools for exact pixels

For a web element’s exact size in CSS pixels, a ruler is the wrong tool. Right-click the element → Inspect. DevTools shows its width and height, padding and margins. For spacing between elements, see how to measure UI spacing.

Converting pixels to cm

The formula is simple once you know the screen’s pixels per inch (PPI):

cm = pixels ÷ PPI × 2.54 inches = pixels ÷ PPI

Pixels at 96 PPI at 160 PPI at 300 PPI at 460 PPI
100 px 2.65 cm 1.59 cm 0.85 cm 0.55 cm
500 px 13.23 cm 7.94 cm 4.23 cm 2.76 cm
1000 px 26.46 cm 15.88 cm 8.47 cm 5.52 cm
1920 px 50.80 cm 30.48 cm 16.26 cm 10.60 cm

Notice the spread: the same pixel count can be 5 cm or 26 cm depending on the screen. That’s why pixels to cm converters that assume 96 PPI are wrong on most phones and modern laptops. A calibrated ruler measures your effective PPI, so its conversion is right for your screen. Learn more in What is PPI?

How many pixels is 1 cm or 1 inch?

Density Pixels per cm Pixels per inch
96 PPI (CSS reference) 37.8 96
153 CSS px/in (iPhone 15, calibrated) 60.4 153
150 DPI (draft print) 59.1 150
300 DPI (photo print) 118.1 300
600 DPI (high-quality print) 236.2 600

Pixels needed = cm × pixels per cm. For a 10 cm wide print at 300 DPI: 10 × 118.1 ≈ 1181 pixels.

Measuring for print

If you want to know how big a photo or document will print:

  1. Open the file’s print preview and set scale to 100% (“Actual size” in most PDF viewers).
  2. Make sure the browser or viewer zoom is 100%.
  3. Measure with the calibrated ruler, using setup A or B above.

If the preview is true to scale, the screen reading matches the paper. Not all preview tools are exact, so for critical jobs, measure the first test print with a physical ruler.

Without measuring: print size in inches = image pixels ÷ print DPI. A 3000 × 2000 pixel photo printed at 300 DPI is 10 × 6.67 inches (25.4 × 16.9 cm). For paper sizes in pixels at each DPI, see the A4 size chart.

How to find an image file’s real pixel size

The size an image appears on a web page is often not its file size, because sites scale images.

  • Windows: right-click the file → Properties → Details → Dimensions.
  • Mac: select the file and press ⌘ + I, or open it in Preview → Tools → Show Inspector.
  • iPhone: open the photo in Photos and swipe up (or tap ⓘ) to see the resolution.
  • Android: in Google Photos, open the photo and swipe up for details.
  • In a browser: right-click the image → Inspect. DevTools shows both the displayed size and the file’s natural size.

Common pitfalls

  • Zoomed pages. Ctrl/⌘ +/− or page zoom changes the size of everything. Our ruler warns you when zoom isn’t near 100%.
  • Retina screenshots. A screenshot from a 3× phone is three times as many pixels as the CSS size. Read about device pixel ratio.
  • Scaled images. Websites often display images smaller or larger than the file itself. To know the file’s own pixel size, check the image info, not the screen.
  • Different monitors. Calibration belongs to one screen. Moving the ruler to another monitor needs a new calibration.
  • Measuring a screenshot instead of the original. Screenshots are captured in device pixels and are often resized when shared by chat apps, so their pixel size tells you little about the original image. Check the source file instead.
  • Trusting the 96 PPI assumption. Online pixels-to-cm converters usually assume 96 pixels per inch. Use them for print maths at a stated DPI, not for what you see on screen.
  • Viewer “fit to window.” PDF and image viewers often scale to fit. Switch to 100% or “Actual size” before measuring.

How do I find my monitor’s PPI?

If you’d rather calculate than calibrate, you need the screen’s native resolution and its diagonal size in inches:

PPI = √(width px² + height px²) ÷ diagonal inches

Screen Resolution Diagonal Physical PPI
Laptop 1920 × 1080 15.6 in ≈ 141
Desktop monitor 1920 × 1080 24 in ≈ 92
Desktop monitor 2560 × 1440 27 in ≈ 109
4K monitor 3840 × 2160 27 in ≈ 163
MacBook Air 13.3” (M1) 2560 × 1600 13.3 in ≈ 227 (Apple lists 227)

Two caveats make the calculated number less useful than it looks. First, advertised diagonals are often rounded (a “27-inch” panel may be 26.9 in of viewable area). Second, operating systems scale the picture: at Windows 150% scaling, a 4K 27-inch monitor shows about 109 CSS pixels per inch, not 163. Web pages, and therefore any browser-based ruler, work in those scaled CSS pixels. That’s why a one-minute card calibration beats arithmetic: it measures what the browser actually draws. See what PPI is and device pixel ratio for the full explanation.

Why isn’t a ruler on screen actual size by default?

Browsers are told by the CSS specification that 1 inch equals 96 CSS pixels. That rule ties the inch to pixels, not to the physical world, so “1in” in CSS is only a real inch on a screen that happens to show 96 CSS pixels per physical inch. Almost none do. On the 24-inch 1080p monitor above, a CSS “inch” is about 1.04 real inches; on a phone it’s usually much smaller than a real inch. A web page also can’t read the physical size of your screen, so no website can be accurate without your help. Calibrating against an object with a standard size, such as an ID-1 card (85.60 × 53.98 mm under ISO/IEC 7810), fixes the scale for that screen.

Worked examples

A banner ad on a desktop monitor. A 728 px wide leaderboard banner shown at 100% on a 24-inch 1080p monitor at 100% scaling (≈ 92 PPI): 728 ÷ 91.8 × 2.54 ≈ 20.1 cm wide. Your calibrated ruler beside the browser window should read close to that.

A photo you want to print. A 1800 × 1200 pixel photo printed at 300 DPI: 1800 ÷ 300 = 6 in and 1200 ÷ 300 = 4 in, a 6 × 4 inch print (15.24 × 10.16 cm). To check a print preview, set it to 100% and lay the calibrated ruler beside it; the long edge should read 6 inches.

A label preview. You’re designing a 50 × 25 mm sticker. Open the print preview at actual size, measure with setup A or B, and confirm the box reads 50 mm by 25 mm before you print a full sheet.

How to measure on a phone screen

On a phone, the ruler and the content can’t share the screen in a useful way, so use a second device or a physical object:

  1. Calibrate the ruler on the phone you’ll use as the measuring tool.
  2. To measure something displayed on another phone or tablet, lay the two devices edge to edge, both screens facing up and flat on a table.
  3. Align zero with one edge of the item and read the other edge, keeping your eye directly above the point you’re reading.
  4. To measure a physical item, place it on the calibrated screen and use Select mode.

Apple’s Measure app and Google’s AR measuring apps estimate distances through the camera. They’re handy for furniture and rooms, but for small items a few centimeters long a calibrated flat ruler is usually more precise, because there’s no camera depth estimate involved.

How long is a ruler on my screen?

The ruler can only show as much length as the screen is wide. As a guide, a 16:9 panel’s width is about 87% of its diagonal: a 24-inch monitor is about 20.9 in (53 cm) wide, enough for a full 30 cm or 12-inch ruler. A phone screen is usually 6 to 7 cm across in portrait and roughly twice that in landscape, so longer items need to be measured in steps: mark the end of the visible scale, slide the item along, and add the readings.

Troubleshooting: my on screen ruler is wrong

Symptom Likely cause Fix
Every reading is off by the same percentage Not calibrated, or calibrated on another screen Calibrate on this screen with a card (guide)
Readings changed after a while Browser zoom or OS scaling changed Reset zoom to 100% (Ctrl/⌘ + 0), then recalibrate if scaling changed
Different reading on a second monitor Each monitor has its own PPI Calibrate separately per monitor
Print preview reads smaller than the print Viewer set to “fit to page” Choose “Actual size” or 100%
Reading jumps by a millimeter or so Parallax from looking at an angle Look straight down at the reading point

A good accuracy check after calibrating: measure the card’s other edge. If the long edge reads 85.6 mm, the short edge should read 54.0 mm. If both are right, the scale is right.

Sources

  • W3C CSS Values and Units Module Level 3 (1in = 96px, 1cm = 96/2.54 px).
  • Manufacturer display specifications for device PPI (e.g. Apple MacBook Air M1 tech specs, 227 ppi).
  • ISO/IEC 7810, ID-1 card format: 85.60 × 53.98 mm.