Audited ·Last updated 28 Jul 2026·6 citations·Tier 1·0 uses

PPI Calculator — Screen Pixel Density

Work out a screen's pixels per inch from its resolution and diagonal — plus dot pitch, pixels per cm, megapixels and the CSS device pixel ratio.

PPI Calculator

What are you solving for?
Native pixel count across the panel — 1920, 2560, 3840, 7680. In the third mode only the shape of this pair matters, so 16 and 9 work just as well as 1920 and 1080.
px
Native pixel count down the panel — 1080, 1440, 2160, 4320. Use the panel's native resolution, not the scaled resolution the operating system reports.
px
The advertised size, corner to corner across the viewable panel. Ignored in the second mode, where it is the answer.
in
Only used in the second and third modes. 96 is the CSS and Windows baseline; 218-264 is where laptop and desktop Retina panels sit; 400-500 is phone territory.
ppi
Pixel density
253.9303
Pixels per inch: the pixel diagonal divided by the physical diagonal. The single number that says how fine the panel's grid is.
Dot pitch
0.1 mm
Pixel density
99.9726 px/cm
Dot pitch
100.0274 µm
CSS device pixel ratio
2.6451×
Horizontal resolution
3,024 px
Vertical resolution
1,964 px
Screen diagonal
14.2 in
Total pixels
5,939,136
Megapixels
5.9391 MP
What this density means
253.9 ppi sits between the 96 ppi baseline that Windows and CSS treat as 1.0x and the roughly 300 ppi that Microsoft describes as readily available on modern high-DPI panels. That is 2.65 device pixels per CSS pixel.

Background.

Two screens can share a resolution and look completely different. A 3840 × 2160 panel is "4K" whether it is a 27-inch monitor 60 cm from your face or an 85-inch television across the room, but the first packs 163 pixels into every inch and the second only 52. Pixel density — pixels per inch, PPI — is the number that captures that difference, and it is the number that actually predicts whether you will see the pixel grid, whether text will look crisp, and whether the operating system will scale the interface.

The calculation is one line of geometry. The pixel grid has exactly the same shape as the panel it sits on, so its diagonal in pixels is √(horizontal² + vertical²), and dividing that by the physical diagonal in inches gives the density. A 14.2-inch MacBook Pro at 3024 × 1964 has a pixel diagonal of 3 605.81, which over 14.2 inches is 253.93 ppi — the 254 ppi Apple prints on its own specification page. That agreement is worth noting: manufacturers and this calculator are doing the same arithmetic, and if a published PPI figure disagrees with the geometry, the published figure has been rounded or the quoted diagonal is not the viewable one.

Dot pitch is the same fact upside down. Where PPI counts pixels per inch, dot pitch measures the centre-to-centre distance between two neighbouring pixels: 25.4 divided by the PPI, in millimetres. Panel datasheets and monitor reviews often quote pitch instead of density, and the two are interchangeable — that MacBook panel has a 0.100 mm pitch, a 27-inch 4K monitor about 0.156 mm, a 55-inch 4K television about 0.317 mm. Pitch is the more intuitive number when you are thinking about whether individual pixels will be resolvable, because it is a physical length you can compare against the size of things you can see.

The third output most people come for is the CSS device pixel ratio, and it exists because of a definition rather than a measurement. The W3C's CSS Values and Units specification pins the CSS pixel to a reference pixel: the visual angle of one pixel on a 96 dpi device at arm's length — about 0.0213 degrees, roughly 0.26 mm, at a nominal 28 inches. The absolute-length table therefore fixes 1in = 96px. Windows uses the same anchor: Microsoft's high-DPI documentation records that DPI-unaware applications render at a fixed value of 96 DPI (100%), and that where displays used to be around 96 pixels per linear inch, panels near 300 DPI and above are now commonplace. Divide your panel's PPI by 96 and you have the scale factor the platform is working with.

The two secondary modes are for the design side of the same question. Given a resolution and a density you want to hit, the calculator returns the panel size that delivers it — useful when you are specifying a kiosk, a digital sign or a VR lens stack rather than buying a monitor. Given a size and a target density, it returns the pixel counts you would need, keeping the aspect ratio of the pair you entered and rounding to whole pixels, then reporting the density those whole pixels actually achieve. That last detail matters: pixel counts are integers, so a target density is almost never hit exactly, and quoting the rounded-integer result rather than the ideal is the honest answer.

One assumption runs through all of it: pixels are square. Every ITU-R display format specifies a pixel aspect ratio of 1:1, and every consumer panel built in the last two decades obeys it, which is what makes a single scalar density meaningful at all. Where that assumption breaks — anamorphic video formats, some legacy standard-definition sources — density stops being one number and becomes two, which is the pixel aspect ratio calculator's territory. This page also stays strictly on the display side of the PPI/DPI divide: printing DPI is a different quantity measured against a different denominator, and the print calculators handle it.

What is ppi calculator?

Pixel density is the number of pixels a display packs into one linear inch of its surface, written PPI (pixels per inch). It is computed from the pixel diagonal and the physical diagonal — PPI = √(width² + height²) ÷ diagonal — and it is the property that determines whether the pixel structure of a panel is visible at a given distance, not the resolution on its own.

Dot pitch is the reciprocal view of the same property: the centre-to-centre spacing of adjacent pixels, equal to 25.4 mm divided by the PPI. Both descriptions assume square pixels, which every modern display format guarantees. A closely related but distinct quantity is DPI in the printing sense, which counts ink dots per inch on paper rather than light-emitting elements on glass; the two are often used interchangeably in conversation and should not be. On the software side, both Windows and CSS treat 96 pixels per inch as the 1.0× baseline, so PPI ÷ 96 gives the device pixel ratio the platform applies when scaling an interface.

How to use this calculator.

  1. Leave the mode on the first option to find the density of a screen you already know the size of.
  2. Enter the native horizontal and vertical pixel counts — the panel's own resolution, not a scaled desktop resolution the operating system is reporting.
  3. Enter the advertised diagonal in inches. This is the viewable panel measurement, corner to corner, excluding the bezel.
  4. Read the PPI and the dot pitch: they are the same fact in two units, and datasheets quote one or the other.
  5. Check the CSS device pixel ratio if you are doing web or interface work — it is the PPI divided by 96, the scale factor CSS and Windows are built around.
  6. Switch to the second mode when you know the resolution and the density you want, and need the panel size that delivers it.
  7. Switch to the third mode when the panel size is fixed and you need the pixel counts; the aspect ratio of whatever pair you enter is preserved, so 16 and 9 work as well as 1920 and 1080.
  8. Compare the answer against your viewing distance separately — the TV size and viewing distance calculator turns a density into a distance at which pixels stop being resolvable.

The formula.

PPI = √(pw² + ph²) ÷ D; pitch = 25.4 ÷ PPI mm; ratio = PPI ÷ 96

A display is a rectangle of pixels laid over a rectangle of glass, and because the pixels are square the two rectangles have exactly the same proportions. That means the diagonal of the pixel grid and the diagonal of the panel describe the same line, one counted in pixels and one measured in inches. The pixel diagonal comes straight from Pythagoras: √(pw² + ph²). Dividing it by the physical diagonal D gives pixels per inch. Nothing else about the panel is needed — not the width, not the height, not the aspect ratio — because the ratio of the two diagonals already carries all of it.

Running that on the 14.2-inch MacBook Pro panel: 3024² = 9 144 576 and 1964² = 3 857 296, so the sum is 13 001 872 and the pixel diagonal is 3 605.8109. Over 14.2 inches that is 253.9303 ppi, which rounds to the 254 ppi Apple publishes. The same arithmetic on a 27-inch 3840 × 2160 monitor gives 4 405.8143 ÷ 27 = 163.18 ppi, and on a 55-inch panel of that resolution 80.11 ppi — the resolution is identical and the density differs by a factor of two, which is the whole point of measuring density rather than counting pixels.

Dot pitch inverts it. If there are P pixels in an inch, each pixel occupies 1/P inch, and since the inch is exactly 25.4 mm by the NIST definition derived from the 1959 international yard, the pitch is 25.4 ÷ P millimetres, or 25 400 ÷ P micrometres. At 253.93 ppi that is 0.10003 mm, almost exactly a tenth of a millimetre.

The CSS ratio is a definition rather than a derivation. The W3C's CSS Values and Units module defines the reference pixel as the visual angle of one pixel on a 96 dpi device viewed at arm's length, and its absolute-length table sets 1in = 96px. Windows anchors to the same figure — DPI-unaware applications render at a fixed 96 DPI, which the system calls 100%. So the device pixel ratio is simply PPI ÷ 96: 2.65 for the MacBook panel, 1.70 for a 27-inch 4K monitor, 0.83 for a 55-inch 4K television, which is why a television used as a monitor makes interface text look oversized.

Both inverse modes fall out of the same equation. Solving PPI = √(pw² + ph²) ÷ D for D gives D = √(pw² + ph²) ÷ PPI, the panel size that delivers a target density for a fixed resolution. Solving for the pixel counts needs the physical width and height, which come from the aspect ratio r = pw ÷ ph as H = D ÷ √(r² + 1) and W = r·H; the required counts are then PPI·W and PPI·H. Those are rarely integers, so the calculator rounds them to whole pixels and recomputes the density the rounded grid actually achieves — at 14.2 inches and a 254 ppi target, 3 025 × 1 965 pixels, achieving 254.03 ppi.

A worked example.

Example

Apple's specification page for the 14-inch MacBook Pro says: "14.2-inch (diagonal) Liquid Retina XDR display; 3024-by-1964 native resolution at 254 pixels per inch". Checking that against the geometry: 3024² = 9 144 576, 1964² = 3 857 296, and the sum is 13 001 872, whose square root is 3 605.8109 pixels across the diagonal. Dividing by the 14.2-inch panel gives 253.9303 ppi, which rounds to exactly the 254 Apple prints. The dot pitch is 25.4 ÷ 253.9303 = 0.10003 mm, or 100.03 µm — a pixel a tenth of a millimetre across. In metric density terms that is 253.9303 ÷ 2.54 = 99.97 pixels per centimetre, so almost exactly 100 pixels to the centimetre. The panel drives 3 024 × 1 964 = 5 939 136 pixels, which is 5.94 megapixels every frame. And because CSS defines one pixel as 1/96 inch, the device pixel ratio is 253.9303 ÷ 96 = 2.645, which is why macOS renders this display at a scaled 2× and why a web page's 1 px border is drawn with roughly two and a half physical pixels. Running the same panel through the second mode confirms the rounding: to land on exactly 254 ppi, that pixel grid would need a 14.1961-inch diagonal — four thousandths of an inch smaller than the real screen, which is the whole of the discrepancy between 253.93 and Apple's published 254.

modeppi-from-size
diagonal In14.2
horizontal Pixels3,024
vertical Pixels1,964
target Ppi254

Frequently asked questions.

How do I calculate PPI?
Square the horizontal pixel count, square the vertical pixel count, add them, take the square root, and divide by the screen's diagonal in inches. For a 27-inch 3840 × 2160 monitor: 3840² + 2160² = 19 411 200, whose square root is 4 405.81, and 4 405.81 ÷ 27 = 163.18 ppi. The reason the diagonal is the right denominator is that square pixels make the pixel grid exactly the same shape as the panel, so the pixel diagonal and the physical diagonal measure the same line in two different units.
What is a good PPI for a monitor?
There is no single answer, because the right density depends on how far away you sit — density and distance always travel together. What can be said without hand-waving is where the reference points are. CSS and Windows both treat 96 ppi as the 1.0× baseline, and Microsoft's own documentation notes that displays used to sit near 96 while panels approaching 300 DPI and higher are now readily available. In practice a 24-inch 1080p monitor is 91.8 ppi (just under the baseline, so interface elements render close to their nominal physical size), a 27-inch 4K is 163 ppi, and laptop Retina panels are 220-260 ppi. Use the viewing distance calculator to turn a density into the distance at which its pixels stop being resolvable.
Is PPI the same as DPI?
Not quite, and the difference matters. PPI counts addressable pixels per inch on a display. DPI in printing counts ink dots per inch on paper, and printers lay down several dots per image pixel, so a 300 ppi image is routinely printed on a 1200 dpi device. Confusingly, operating systems use "DPI" for the display case too — Windows calls its display scale factor DPI and anchors it at 96. On this page, PPI always means display pixels per inch; if you are working out how many pixels an image needs to print at a given size, that is the print-side calculation and a different tool.
What is dot pitch and how does it relate to PPI?
Dot pitch is the centre-to-centre distance between two neighbouring pixels, and it is simply 25.4 mm divided by the PPI, because an inch is exactly 25.4 mm by NIST's definition derived from the 1959 international yard. A 253.93 ppi laptop panel has a 0.1000 mm pitch; a 163 ppi 27-inch 4K monitor has 0.1556 mm; a 55-inch 4K television has 0.3170 mm. Datasheets quote pitch more often than density because it is the number the panel is manufactured to. The two carry identical information — if you know one, you know the other.
Why does my screen's PPI not match the manufacturer's figure exactly?
Almost always rounding. Manufacturers quote the density to the nearest whole number and the diagonal to the nearest tenth of an inch, and those two roundings compound. Apple's 14-inch MacBook Pro is published as "14.2-inch, 3024-by-1964, 254 ppi"; the geometry on those exact figures gives 253.93. Running the second mode shows why: to hit 254.00 exactly the panel would have to be 14.1961 inches, so the real diagonal is a few thousandths larger than the round number in the specification. A discrepancy of more than a percent or so usually means the quoted diagonal includes bezel, or the resolution quoted is a scaled one rather than the panel's native grid.
What is the CSS device pixel ratio and why is it PPI divided by 96?
The W3C's CSS Values and Units specification defines the reference pixel as the visual angle of one pixel on a device with a pixel density of 96 dpi viewed at arm's length — approximately 0.0213 degrees, about 0.26 mm, at a nominal 28 inches. Its absolute-length table then fixes 1in = 2.54cm = 96px. Windows anchors to the same number: DPI-unaware applications render at a fixed DPI of 96, which the system labels 100%. So dividing a panel's real density by 96 gives the number of device pixels available for each CSS pixel: 2.65 on a 254 ppi laptop, 1.70 on a 27-inch 4K monitor, 0.83 on a 55-inch 4K television.
Does higher PPI always mean a sharper image?
Only up to the point where your eye stops resolving the difference, and only if everything else is equal. Two panels at the same PPI can look different because PPI counts addressable pixels, not sub-pixels: a conventional RGB stripe panel and a PenTile panel at the same nominal density have different numbers of red, green and blue emitters, and text rendering in particular can look different. Beyond a certain density the returns vanish entirely — once the pixel pitch is smaller than the finest detail your eye resolves at your viewing distance, extra density adds cost and power draw and nothing visible.
What resolution do I need for a given screen size and density?
Use the third mode. It takes the diagonal and the target density, keeps the aspect ratio of whatever pixel pair you entered, and returns the pixel counts. For a 27-inch 16:9 panel at 163 ppi it returns 3 836 × 2 158 — very nearly 4K, which is why 27-inch 4K monitors land where they do. Because pixel counts must be whole numbers, the result is rounded and the calculator then reports the density that rounded grid actually achieves rather than the target you asked for.
Does PPI apply to phones and VR headsets the same way?
The arithmetic is identical — a 6.06-inch phone at 2796 × 1290 is 508 ppi by exactly the same formula — but the interpretation changes with viewing distance. A phone is held at 30 cm and a headset lens sits centimetres from the eye, so both need far higher densities than a monitor to achieve the same apparent smoothness. For microdisplays the micrometre pitch output is the more useful figure: 508 ppi is a 50 µm pitch, while the panels in high-end headsets run below 10 µm.
Can I use this for a projector or a projected image?
Yes, if you treat the projected image as the screen. Enter the projector's native resolution and the diagonal of the image on the wall, and the result is the density of that image. Because projected images are large, the densities are low — a 1920 × 1080 projector filling a 120-inch diagonal gives 18.4 ppi, a 1.38 mm pitch. That is not a fault; it is why projectors are viewed from much further away than monitors. The throw distance that produces a given image size is a separate calculation.
Why does the calculator assume square pixels?
Because essentially every display made in the last two decades has them, and the standards say so. Recommendation ITU-R BT.709 specifies a pixel aspect ratio of 1:1 for HDTV, and BT.2020 carries the same 1:1 pixels into 4K and 8K. Square pixels are what allow a single scalar density to describe a panel; if pixels were taller than they are wide, horizontal and vertical density would differ and one number would be meaningless. The formats where that genuinely happens are anamorphic video sources, which need a pixel aspect ratio calculation instead.
How many megapixels is my screen?
Multiply the two pixel counts and divide by a million — the calculator does it for you. A 1920 × 1080 panel is 2.07 MP, a 3024 × 1964 laptop panel is 5.94 MP, a 3840 × 2160 4K panel is 8.29 MP and a 7680 × 4320 8K panel is 33.18 MP. It is a useful figure when you are matching an image to a display, since an image with fewer pixels than the panel will be upscaled, but it says nothing about density on its own: the 8K figure is the same whether the panel is 55 inches or 110.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 590 calculators remain free
  • No billing is enabled
Coming soon