Toolman

Convert px to cm

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

Formula

cm = px × 0.026458
px = cm × 37.7953

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

PX to CM conversion table

pxcm
8px0.211667cm
10px0.264583cm
12px0.3175cm
14px0.370417cm
16px0.423333cm
18px0.47625cm
20px0.529167cm
24px0.635cm
28px0.740833cm
32px0.846667cm
36px0.9525cm
40px1.0583cm
48px1.27cm
56px1.4817cm
64px1.6933cm
72px1.905cm
80px2.1167cm
96px2.54cm
128px3.3867cm

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 cm

One centimetre is 96/2.54 ≈ 37.795 CSS pixels. Useful in print stylesheets, misleading on screen.

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 cm?

16px equals 0.423333cm at a 16 px root font size.

How do I convert px to cm?

Multiply the px value by 0.026458. Going the other way, multiply the cm value by 37.7953.

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