Screen DPI and Pixel Density Test

Enter your screen's diagonal below to estimate its pixel density in PPI; this is screen DPI, not mouse DPI. A browser cannot measure physical size, so on its own it only has the CSS convention of 96 pixels per inch.

Device pixel ratio
—
Reported by the browser. Operating system scaling sets it, and most desktop browsers multiply it by the page zoom.
Physical pixels per CSS pixel
—
The ratio squared: how many physical pixels one CSS pixel covers in area.
Nominal pixel density
—
96 × the ratio. Assumes the CSS convention of 96 px per inch, which is not a measurement of your screen.

Reading what the browser reports…

On-screen ruler

Hold a real ruler against these. If they match, 96 CSS pixels on your screen measure one real inch. Most screens do not, which is normal.

PPI calculator

Between 3 and 100, from the manufacturer's specifications. For example 15.6 or 27.
Resolution (pixels)
The native resolution, 100 to 16384 per side. Leave both blank to use what this screen reports.

A browser cannot measure the physical size of your screen, so it cannot know the true DPI on its own. Everything above is calculated from values the browser reports.

What the numbers mean

CSS pixels

A CSS pixel is the unit web pages are laid out in, and the CSS specification defines 96 of them as one inch. That definition is a convention for layout, not a measurement of your screen.

Physical pixels

A physical pixel is one of the light-emitting dots in the panel, fixed by the hardware. Operating system scaling and browser zoom decide how many of them each CSS pixel covers.

Device pixel ratio

The device pixel ratio is how many physical pixels wide one CSS pixel is, so a ratio of 2 draws each CSS pixel as a 2 × 2 block. Scaling of 150 percent gives 1.5, and most desktop browsers multiply it further by the page zoom.

Runs entirely in your browser. Test results, audio and video never leave your device.

Next steps

How to find your screen's DPI

  1. Reset the browser zoom to 100 percent with Ctrl+0 (Cmd+0 on a Mac). In most browsers, zoom changes the pixel ratio the estimate is built on.
  2. Look up your screen's diagonal in inches in the manufacturer's specifications, for example 15.6 or 27.
  3. Type it into Screen diagonal (inches), between 3 and 100. Pixel density, pixel pitch and the visible area appear, with a note naming the resolution they use.
  4. Check that the resolution in the note matches your screen's native resolution. If it does not, or to check another screen, type the native resolution into the two Resolution boxes.
  5. Hold a real ruler against the On-screen ruler to see how far the browser's nominal inch and centimeter are from real ones.

What is screen DPI?

Screen DPI, more precisely PPI (pixels per inch), is the number of pixels along one inch of a display. It follows from two numbers: the native resolution and the physical size of the screen. A browser can report the resolution but not the size, so a true figure needs the diagonal from the screen's specifications.

Screen DPI vs mouse DPI

DPI means different things for screens, mice and printers. This page covers screens only.

TermWhat it meansWhere to find it
Screen DPI (PPI)Pixels per inch of a display, fixed by its resolution and sizeCalculated on this page from the diagonal and resolution
Mouse DPI (CPI)How many counts the mouse sensor reports per inch of movement; a higher value moves the pointer further for the same hand movementThe mouse's specifications or its maker's software, or an estimate from the Mouse DPI Test. The Mouse Test checks buttons, scrolling and pointer movement, not DPI
Print DPIInk dots per inch on paper, or the print size setting stored in an image fileThe printer or image settings

How to calculate PPI from screen size and resolution

Divide the number of pixels along the diagonal by the diagonal in inches: PPI = √(width² + height²) ÷ diagonal. Use the native resolution, not a scaled one. For a 15.6-inch 1920 × 1080 laptop, √(1920² + 1080²) ≈ 2203 pixels, and 2203 ÷ 15.6 ≈ 141 PPI.

ScreenResolutionPixel density
14-inch laptop1920 × 1200≈ 162 PPI
15.6-inch laptop1920 × 1080≈ 141 PPI
24-inch monitor1920 × 1080≈ 92 PPI
27-inch monitor1920 × 1080≈ 82 PPI
27-inch monitor2560 × 1440≈ 109 PPI
27-inch monitor3840 × 2160≈ 163 PPI
32-inch monitor3840 × 2160≈ 138 PPI
34-inch ultrawide3440 × 1440≈ 110 PPI

What this test can detect

  • Your device pixel ratio, and how many physical pixels each CSS pixel covers.
  • Whether your system treats the screen as high density: a ratio above 1 at 100 percent zoom.
  • The true pixel density in PPI, from the diagonal you enter and either the resolution your browser reports or one you type.
  • The pixel pitch in millimeters and the width and height of the visible area in inches and centimeters.
  • The physical resolution the estimate rests on, to check against your screen's specifications.
  • How far the browser's nominal inch and centimeter are from real ones, held against a physical ruler.

How it works

The page reads the device pixel ratio and the screen size in CSS pixels. The physical resolution is the screen size multiplied by the ratio and rounded. The calculator divides the diagonal in pixels, √(width² + height²), by the diagonal you enter, from 3 to 100 inches, using that resolution or the one you type. Pixel pitch is 25.4 mm ÷ PPI, and the visible area is each side in pixels ÷ PPI. The nominal density is 96 × the ratio.

The rulers are 6 inches and 15 centimeters long in CSS units, so the browser draws them at 96 CSS px per inch (576 px) and about 37.8 per centimeter (567 px). Values refresh on resize, when the ratio changes, and every second.

Limitations

  • A browser cannot measure the physical size of your screen, so the estimate is only as good as the diagonal you enter.
  • With the Resolution boxes empty, the estimate does not correct for browser zoom or scaled display modes: it uses whatever resolution the note shows. Typing the native resolution avoids this.
  • The visible area assumes square pixels, which almost every modern screen has.
  • The rulers are not calibrated. They show the browser's nominal inch and centimeter, which usually differ from real ones.
  • On a multi-monitor setup, the values describe the screen the window is on.

Frequently asked questions

Why is the on-screen ruler the wrong length?

Because CSS defines an inch as 96 CSS pixels, whatever the screen. The ruler matches a real one only when the pixel density equals 96 × the device pixel ratio. On a 15.6-inch 1920 × 1080 laptop at 125 percent scaling, each ruler inch comes out about 0.85 inches long.

How do I find my screen size in inches?

Check the model's specifications, or measure the visible screen area diagonally from corner to corner. Screens are sold by that diagonal. A website cannot read the physical size: browsers report pixels only.

What is a high-DPI display?

A screen dense enough that the system draws each interface pixel with more than one physical pixel, so text keeps its size but looks sharper. A device pixel ratio above 1 at 100 percent zoom means your system treats the screen this way; the Screen Resolution Test explains the ratio. Retina is Apple's name for its own high-density screens.

Does a higher PPI mean a sharper screen?

Yes, at the same viewing distance: smaller pixels make text and edges look smoother. Viewing distance matters too, which is why a TV with far fewer pixels per inch than a phone can look just as sharp from across the room.

Why does the estimate differ from the manufacturer's PPI?

Usually because the note shows a resolution that is not the native one, as with browser zoom or a scaled display mode on a Mac. Type the native resolution into the Resolution boxes to rule that out. Specifications also round the diagonal, so a small difference is still normal.