Pixels to Inches Converter Formula

Understand the math behind the pixels to inches converter. Each variable explained with a worked example.

Formulas Used

Inches

inches = dpi > 0 ? pixels / dpi : 0

Centimeters

cm = dpi > 0 ? pixels / dpi * 2.54 : 0

Millimeters

mm = dpi > 0 ? pixels / dpi * 25.4 : 0

Variables

VariableDescriptionDefault
pixelsPixels(px)300
dpiResolution (DPI)(DPI)96

How It Works

Pixels to Physical Size

Inches = Pixels / DPI (Dots Per Inch)

Common DPI Values

| Context | Typical DPI | |---|---| | Screen (standard) | 72-96 | | Retina display | 144-220 | | Print (standard) | 150-300 | | High-quality print | 300-600 |

Worked Example

300 pixels at 96 DPI.

pixels = 300dpi = 96
  1. 01Inches = 300 / 96 = 3.125 inches
  2. 02Centimeters = 3.125 x 2.54 = 7.937 cm

Ready to run the numbers?

Open Pixels to Inches Converter