Toolman

Convert px to in

At the browser default root font size of 16 px, 1px = 0.010417in. Change the base below if your project uses a different root size.

Formula

in = px × 0.010417
px = in × 96

Both units are absolute in CSS, so this ratio never changes regardless of font size or user settings.

PX to IN conversion table

pxin
8px0.083333in
10px0.104167in
12px0.125in
14px0.145833in
16px0.166667in
18px0.1875in
20px0.208333in
24px0.25in
28px0.291667in
32px0.333333in
36px0.375in
40px0.416667in
48px0.5in
56px0.583333in
64px0.666667in
72px0.75in
80px0.833333in
96px1in
128px1.3333in

About px

The CSS pixel is the reference unit of the web. It is not a physical device pixel — it is an angular measure standardised at 1/96th of an inch, which the browser scales for device pixel ratio and zoom.

About in

CSS defines one inch as exactly 96 pixels. On screen this is a nominal measure, not a guarantee of physical size; in print stylesheets it maps to a real inch.

Which unit should you use?

PropertyRecommended unitWhy
Font sizeremScales with the user's browser font-size preference, which px ignores — an accessibility requirement.
Padding and marginrem or emrem for a consistent global rhythm; em when the spacing should track the component's own text size.
Borders and hairlinespxYou almost always want exactly one crisp pixel, not a value that scales.
Media query breakpointsemHistorically the most reliable across browsers when the user zooms.
Print stylesheetspt, cm, mmThese map to real physical measurements on paper.

Frequently asked questions

What is 16px in in?

16px equals 0.166667in at a 16 px root font size.

How do I convert px to in?

Multiply the px value by 0.010417. Going the other way, multiply the in value by 96.

Does browser zoom change the result?

No. Both units are absolute in CSS and keep the same ratio at any zoom level, though the rendered size on screen changes.

Why does CSS use 96 pixels per inch?

It is a historical convention from early desktop displays that became the fixed CSS reference. It has nothing to do with your monitor's real pixel density — the browser scales CSS pixels to physical ones for you.

Related CSS unit conversions

All CSS unit converters · All converters