A pixel has no fixed size. It is a point in a grid, and how big it is in the real world depends on how many of them are packed into each inch — the pixel density, measured in PPI (pixels per inch) for screens and DPI (dots per inch) for printers. This converter turns a number of pixels into inches, centimetres, millimetres and typographic points at the density you choose, and works backwards too: pick Solve for → Pixels and enter a length to get the pixels it needs.
Three situations cover almost every question. Printing: at 300 DPI, the usual photo standard, 3000 pixels print 10 inches wide. Web design: CSS defines its own inch as exactly 96 CSS pixels, so a 96 px box is "1 inch" in a style sheet, even though it rarely measures that on a real monitor. Screens: if you know your monitor’s resolution and diagonal, switch to From my screen size to get its true PPI, the size of one pixel and how long a given number of pixels really is on that display.
For megapixels, aspect ratios and file sizes of whole images, use the image resolution calculator; this page focuses on turning one pixel length into a physical length.
How to use this calculator
- Choose whether you know the PPI / DPI (printing, CSS, a known screen) or want it worked out from your screen size.
- Enter the number of pixels (a width, a height or any distance).
- Enter the resolution in pixels per inch — 300 for photo prints, 96 for CSS — or, in screen mode, the screen’s resolution and diagonal.
- Read the length in inches, centimetres, millimetres and points. The table shows the same pixels at 72, 96, 150, 300 and 600 PPI.
- To go from inches to pixels, use Solve for → Pixels and type the length you need.
The formula
With pixels at a density of pixels per inch:
The inch is exactly 2.54 cm, and a typographic (PostScript / CSS) point is exactly 1/72 inch. In CSS, , so one CSS pixel is in ≈ 0.2646 mm.
A screen of pixels with a diagonal of inches has a density of
and its pixel pitch (the size of one pixel) is mm.
Worked example
Print size at 300 DPI. A 3000 × 2000 pixel photo printed at 300 DPI measures in by in, that is 25.4 × 16.93 cm.
CSS. A 96 px element is 1 CSS inch; a 300 px banner is CSS inches, or 7.938 cm in the CSS sense.
A 24-inch Full HD monitor. The diagonal holds pixels, so the density is PPI and each pixel is about 0.277 mm wide. On this screen the same 300 px banner is really 3.268 in (8.3 cm) long, and the visible area is 20.92 × 11.77 in. A 27-inch 2560 × 1440 monitor reaches 108.79 PPI.
PPI, DPI and CSS pixels: three different "pixels per inch"
- PPI describes a digital image or a screen: how many pixels fill one inch. An image file only suggests a PPI in its metadata; changing it does not change a single pixel, only the default print size.
- DPI is strictly a printer property — how many ink dots per inch — but in everyday use, "print at 300 DPI" means "place 300 image pixels per inch", which is what this converter assumes.
- CSS pixels are a reference unit. The W3C fixes 1 CSS inch at 96 CSS pixels; browsers then map CSS pixels to device pixels through the device pixel ratio (2 or 3 on most phones). So "inches" in a style sheet are only physically accurate when printing.
| Use | Typical density |
|---|---|
| Photo prints, magazines | 300 DPI |
| Posters seen from a distance | 100–150 DPI |
| CSS reference, Windows at 100 % | 96 PPI |
| Points (typography) | 72 per inch |
| Full HD 24″ monitor | about 92 PPI |
| Recent smartphones | 400–500 PPI |
Frequently asked questions
How many pixels are in an inch?
It depends on the density. In CSS, an inch is always 96 pixels. For printing it is whatever DPI you print at — 300 for photo quality. On a physical screen it is the screen’s PPI, about 92 on a 24-inch Full HD monitor and over 400 on many phones.
How do I convert pixels to inches?
Divide the number of pixels by the pixels per inch. 1200 px at 300 DPI is 4 inches; 1200 px at 96 PPI is 12.5 inches. Multiply inches by 2.54 for centimetres.
How do I convert pixels to cm?
Divide by the PPI to get inches, then multiply by 2.54. At 300 DPI one pixel is 0.0847 mm, so 3000 px is 25.4 cm; at 96 PPI one pixel is about 0.2646 mm.
Why does my 1-inch CSS box not measure one inch on screen?
Because CSS units are anchored to the 96 px reference pixel, not to the ruler. The browser does not know your screen’s physical size, so the box is only one real inch if the screen happens to have 96 PPI times the device pixel ratio. Printed pages respect CSS inches.
Does changing an image’s DPI change its quality?
No. The pixel count stays the same; only the print size suggested to software changes. To print larger at the same quality you need more pixels, not a higher DPI number.
Sources
- W3C, CSS Values and Units Module Level 3, §5.2 Absolute lengths (1in = 96px = 72pt)
- NIST SP 811, Guide for the Use of the SI, appendix B (1 in = 2.54 cm exactly)
- Pixel density (PPI from resolution and diagonal), overview
Last updated: