Converter
DPI
px
mm
cm
in
At 96 DPI
Formula: px × 25.4 ÷ DPI Decimal places: 4
Quick Reference

Common Pixel Conversions at Every DPI

Use this table to quickly find the physical size of common pixel values at different DPI settings:

Pixels96 DPI (web)150 DPI (draft)300 DPI (print)600 DPI (photo)
100 px26.46 mm16.93 mm8.47 mm4.23 mm
500 px132.29 mm84.67 mm42.33 mm21.17 mm
1000 px264.58 mm169.33 mm84.67 mm42.33 mm
1920 px508.00 mm325.12 mm162.56 mm81.28 mm
3840 px1016.00 mm650.24 mm325.12 mm162.56 mm
Complete Guide

What Is a Pixel Converter?

A pixel converter is a tool that translates between digital pixels and real-world physical length units — millimeters, centimeters, and inches — at a specified DPI (dots per inch). Since a pixel has no fixed physical size, the conversion depends entirely on the pixel density of the target medium. This converter gives you instant, accurate results for any DPI value.

Every digital display and print medium has a pixel density measured in DPI (dots per inch) or PPI (pixels per inch). A 96-DPI web display renders one CSS pixel as exactly 1/96 of an inch (approximately 0.265 mm), while a 300-DPI printer packs 300 dots into every inch, making each pixel just 0.085 mm across. The same 100 pixels therefore measures 26.46 mm on a web display but only 8.47 mm in a high-quality print — that is a threefold difference. Without a pixel converter, it is nearly impossible to accurately translate between digital dimensions and physical measurements.

Who Uses a Pixel Converter?

Web and UI designers use pixel converters to translate physical mockup measurements into CSS pixels. When a client specifies a button should be 10 mm wide on screen, the designer needs to know how many CSS pixels that corresponds to at the standard 96-DPI reference. Print designers work in Photoshop or Figma at various DPI settings and need to know the physical dimensions their pixel exports will produce on paper — a 3000-pixel-wide image at 300 DPI prints at exactly 10 inches wide. Photographers calculate print sizes from camera megapixel counts. A 4000×3000 pixel photograph at 300 DPI prints to 13.3×10 inches, which determines whether a standard frame or a custom size is needed. Developers validate that CSS pixel values match physical size specifications from product or accessibility requirements. Students in computer graphics, digital media, and mathematics courses use pixel converters to complete assignments involving screen resolution, pixel density, and unit conversion.

How to Use the Pixel Converter

  1. Enter a value — Type any positive number into any of the four input fields (Pixels, Millimeters, Centimeters, or Inches). The other three fields update instantly.
  2. Select a DPI preset — Choose from the five common presets: 96 DPI for web, 72 DPI for legacy Mac, 150 DPI for draft print, 300 DPI for high-quality print, or 600 DPI for photo prints.
  3. Use custom DPI — If your medium uses a non-standard DPI, type the number directly into the Custom DPI field. The conversion updates in real time.
  4. Copy any result — Click the copy icon next to any converted value to place it on your clipboard. A brief confirmation appears to confirm the copy.
  5. Read the formula — The info panel below the inputs shows the active conversion formula and the current DPI setting for full transparency.

Understanding DPI Presets

The five DPI presets cover 95% of real-world pixel conversion scenarios:

  • 96 DPI (Web Standard) — CSS, browsers, and operating systems standardized on 96 reference pixels per inch in the late 1990s. Every modern browser treats 1 CSS pixel as 1/96 inch regardless of the physical display. This is the correct setting for all web and UI design work. Retina and HiDPI monitors render at higher physical density, but the OS scales CSS pixels back to the 96-DPI reference, so all layout math stays valid at 96 DPI.
  • 72 DPI (Mac Legacy) — This value dates back to early Apple Macintosh typography, where one pixel equalled one printer's point (1/72 inch). It remains useful only when working with legacy Mac-era assets or certain graphic design files that were created at 72 DPI. For modern web work, always use 96 DPI.
  • 150 DPI (Draft Print) — A common setting for proof prints, large-format banners, and internal drafts where file size matters more than absolute sharpness. At 150 DPI, images are half the resolution of 300 DPI but still appear sharp when viewed from a typical distance of one meter or more.
  • 300 DPI (High-Quality Print) — The gold standard for magazine publishing, book printing, brochures, and consumer photo prints. At 300 DPI, individual dots are invisible to the naked eye at normal reading distance, producing smooth gradients and crisp text. Most commercial printers expect 300 DPI artwork.
  • 600 DPI (Photo Print) — Used for fine art prints, technical drawings, small text on glossy paper, and any application where the print will be inspected under magnification. Going beyond 600 DPI rarely improves visible quality and significantly increases file size and processing time.

How the Conversion Works

The pixel converter uses these fundamental formulas based on the international inch standard (1 inch = 25.4 mm exactly):

  • Pixels to millimeters: mm = px × 25.4 ÷ DPI
  • Pixels to centimeters: cm = px × 2.54 ÷ DPI
  • Pixels to inches: in = px ÷ DPI
  • Millimeters to pixels: px = mm × DPI ÷ 25.4
  • Centimeters to pixels: px = cm × DPI ÷ 2.54
  • Inches to pixels: px = in × DPI

All calculations are performed in JavaScript using IEEE 754 double-precision floating point, which gives you accuracy to within 1×10⁻⁶ relative error. The results are displayed to four decimal places, which is more than sufficient for web design, print production, and photography. The only source of real-world inaccuracy is the DPI value itself — if your display does not actually run at the assumed DPI, calibrate first using the Screen Ruler tool.

Web vs. Print: Choosing the Right DPI

One of the most common mistakes in pixel conversion is using the wrong DPI for the target medium. The difference between web and print conversion is dramatic. A 1000-pixel-wide image measures 264.58 mm (10.42 inches) at 96 DPI — roughly the width of a sheet of letter paper. The same 1000 pixels at 300 DPI measures just 84.67 mm (3.33 inches) — about the width of a business card. If you export a web-banner at 300 DPI expecting it to fill a 10-inch print space, your output will be less than a third of the intended size. Conversely, a document designed at 96 DPI and sent to a 300-DPI printer without conversion will appear blurry and pixelated because each CSS pixel is being rendered as three printer dots. The pixel converter eliminates this confusion by letting you see the physical dimensions at every common DPI simultaneously.

Retina and HiDPI Displays

Modern devices with Retina, Liquid Retina, 4K, and 5K displays pack two, three, or even more physical pixels into the space of one CSS pixel. The iPhone 15 Pro Max, for example, has a physical resolution of 2796×1290 pixels but uses a device pixel ratio of 3, so its CSS resolution is 932×430. This means the converter's 96-DPI setting is already correct for layout math: 100 CSS pixels at 96 DPI equals 26.46 mm on screen regardless of whether the display is standard, Retina, or 8K. However, if you need the physical pixel count — for example, when generating bitmap assets at exactly the right resolution for a specific device — multiply the CSS pixel value by the device pixel ratio (window.devicePixelRatio in any modern browser) and use that number as your input.

Why Accuracy Matters

Inaccurate pixel-to-physical conversions can lead to costly mistakes across multiple industries. A print designer who miscalculates a 300-DPI brochure layout might produce a final print that is visibly off by centimeters. A product packaging designer who converts pixels to millimeters incorrectly could create a label that does not fit the intended container. A photographer who misjudges print dimensions might order custom frames that do not match the image size. A web developer who misinterprets a design specification in millimeters could ship a layout that looks completely different from the mockup. The pixel converter eliminates these risks by providing instant, verifiable, and transparent conversions with a clear display of the underlying formula and DPI setting.

Practical Examples

Example 1: Web button sizing. A designer specifies a call-to-action button should be 12 mm wide on screen. At 96 DPI: px = 12 × 96 ÷ 25.4 ≈ 45.35 px. The developer uses 45 px in CSS and the button measures exactly 12 mm on any properly configured display.

Example 2: Photo print sizing. A photographer captures a 6000×4000 pixel image. At 300 DPI: width = 6000 ÷ 300 = 20 inches (508 mm). Height = 4000 ÷ 300 = 13.3 inches (338.67 mm). The photographer knows a 20×13.3 inch print requires a custom frame size.

Example 3: Icon export. A UI designer creates a 48×48 pixel icon at 96 DPI for web use. The same icon needs to be printed in a brochure at 300 DPI. The designer exports at 48 px for web and 150 px for print (48 × 300 ÷ 96 = 150) to maintain the same physical size.

Frequently Asked Questions

What is a pixel?
A pixel is the smallest discrete unit of a digital display or image. Its physical size is not fixed — it depends entirely on the screen's pixel density (DPI) or the print resolution. On a 96-DPI web display, one pixel is exactly 1/96 of an inch (about 0.265 mm). On a 300-DPI print, one pixel is 1/300 of an inch (about 0.085 mm). The word "pixel" is a portmanteau of "picture element."
What is DPI and why does it matter?
DPI (dots per inch) is the conversion factor between pixels and physical length. It tells you how many pixels or dots fit into one inch of physical space. The same 100 pixels maps to 26.46 mm at 96 DPI but only 8.47 mm at 300 DPI. You must use the DPI of the target medium — the screen, the print, or the export — for the conversion to be physically meaningful. Using the wrong DPI produces mathematically correct but physically wrong results.
How do I convert pixels to millimeters?
Divide the pixel count by the DPI to get inches, then multiply by 25.4 to get millimeters: mm = (px / DPI) × 25.4. For 100 px at 96 DPI: 100/96 × 25.4 ≈ 26.46 mm. The converter does this calculation in real time as you type, saving you from manual arithmetic and potential rounding errors.
Should I use 72 or 96 DPI for the web?
Use 96 DPI. CSS, browsers, and operating systems standardized on 96 reference pixels per inch in the late 1990s. The 72 DPI value is a legacy from early Apple Macintosh typography (one pixel = one printer's point = 1/72 inch) and remains useful only for specific legacy Mac-era assets. For all modern web design, UI work, and development, always use 96 DPI.
What DPI should I use for print?
Use 300 DPI for high-quality magazine and book print, 150 DPI for draft proofs and large-format banners, and 600 DPI only for fine art photo prints, technical line drawings, or small text on glossy paper where the viewer will inspect the print from close range. Going above 600 DPI almost never improves visible quality and increases file size exponentially.
How does Retina and HiDPI affect the conversion?
Retina and other HiDPI displays render two or three physical pixels for every CSS pixel, but the operating system handles the scaling transparently. The converter works in CSS pixels by default, so 100 CSS px at 96 DPI is correct for any HiDPI screen. If you need the physical pixel count — for bitmap asset generation — multiply the CSS pixel value by window.devicePixelRatio to get the actual physical pixels.
Can I convert in reverse — from inches to pixels?
Yes. The converter supports bidirectional conversion. Simply type your value into the Inches input field, and the Pixels field updates automatically. The formula used is: px = in × DPI. For example, 2 inches at 300 DPI equals 600 pixels. This is especially useful for print designers working from physical specifications.
Is this converter accurate for decimal pixel values?
Yes. The converter handles any positive numeric values, including decimals like 12.7 px or 3.5 mm. All calculations use IEEE 754 double-precision floating point with accuracy to within 1×10⁻⁶ relative error. Results are displayed to four decimal places, which is more than sufficient for all practical applications in web design, print production, and photography.

The Mathematics Behind Pixel Conversion

Every pixel conversion is built on a single foundational relationship: one international inch equals exactly 25.4 millimeters. This standard, established by the International Yard and Pound Agreement of 1959, means that all length conversions are ultimately anchored to the same reference. The pixel adds a second variable: the pixel density of the medium, expressed in DPI. The core equation is:

Physical Length (inches) = Pixel Count ÷ DPI

From this single equation, all other conversions follow by simple multiplication or division by 25.4 (for millimeters) or 2.54 (for centimeters). The accuracy of the converter is therefore limited only by the precision of the DPI value you supply. If you know your screen's exact DPI — either from the manufacturer's specification or from a physical calibration using a credit card against the Screen Ruler tool — the converter will give you physically accurate results.

Common Conversion Mistakes to Avoid

  • Using the wrong DPI: A web banner designed at 300 DPI will render physically smaller than intended on screen. Always match the DPI to the target medium — 96 for web, 300 for print.
  • Confusing DPI with PPI: DPI (dots per inch) and PPI (pixels per inch) are often used interchangeably. In digital contexts, PPI is technically more accurate for displays, but DPI is the standard term in print. Both refer to the same numerical value.
  • Ignoring OS scaling: Windows, macOS, and Linux all apply display scaling on high-resolution monitors. A 4K display at 150% scaling has an effective 96-DPI reference, but the physical DPI is much higher. Always use the scaled (effective) DPI for layout calculations.
  • Rounding too early: Intermediate rounding can accumulate significant errors. Always carry full precision through the calculation and round only the final result.
  • Forgetting unit conversion: When converting pixels to millimeters, remember to multiply by 25.4 (the number of millimeters in an inch), not 25.4 divided by something. The formula is length in mm = (px / DPI) × 25.4.

Tips for Developers

When implementing pixel-accurate layouts, always verify the browser is reporting the expected reference DPI by checking window.matchMedia('(min-resolution: 96dpi)').matches in the developer console. On a correctly configured system this returns true. Export design assets at the target DPI of the delivery medium — exporting a 96-DPI Figma canvas at 300 DPI does not upsample the image; it simply relabels the metadata. For responsive images, use the srcset attribute with descriptors that match the device pixel ratio rather than hardcoding pixel dimensions.

Other Measurement Tools

If you found this pixel converter useful, explore the other measurement and calculation tools available:

  • Screen Ruler — Measure any object on your screen with pixel-perfect accuracy. Calibrate using auto-detect, screen diagonal, or a credit card.
  • Printable Ruler — Download and print a physical ruler at exact scale. Customize units, length, and graduation marks.
  • Aspect Ratio Calculator — Simplify any width and height to its lowest ratio. Supports 16:9, 4:3, 1:1, 21:9, and more.
  • Device Specs Library — Browse PPI, screen size, and resolution specifications for 100+ devices including smartphones, tablets, laptops, and monitors.
  • Online Protractor — Measure angles on screen with an interactive digital protractor.