This CM to PX Converter translates centimeter values into pixels instantly, based on your chosen DPI setting. Designers and developers constantly switch between print and screen units. This tool makes that process frictionless.
Key features:
-
DPI-aware conversion — choose between common presets like 72, 96, 150, and 300 DPI
-
Reverse conversion — swap direction to convert px back to cm
-
Common reference values — a built-in table of standard sizes for quick lookup
-
Copy result — grab the output with one click
Whether you're preparing assets for print or matching CSS pixel values to a physical spec, accurate unit conversion matters. No guesswork, no manual math.
Formula: px = (cm / 2.54) × DPI
Free to use, no signup required.
What is a CM to PX Converter
A CM to PX converter is a tool that translates a physical length value in centimeters into a digital pixel value, using screen or print resolution as the conversion factor.
Without knowing the DPI (dots per inch) of your medium, the output is meaningless. Two screens can show the same number of pixels at completely different physical sizes.
Used daily in web design, print preparation, and UI prototyping.
How Do You Convert CM to PX
The conversion is not a fixed ratio. It depends entirely on the pixel density of your target medium.
The Formula
px = cm x (DPI / 2.54)
1 inch = 2.54 cm. The formula converts centimeters to inches first, then scales by pixel density.
Why 2.54?
There are exactly 2.54 centimeters in one inch. Every cm-to-pixel calculation routes through inches as the bridge unit.
No shortcut exists. You always need DPI.
Step-by-Step Calculation
-
Identify your value in centimeters
-
Identify the DPI of your medium
-
Apply: px = cm x (DPI / 2.54)
5 cm at 96 DPI = 5 x (96 / 2.54) = 188.98 px
5 cm at 300 DPI = 5 x (300 / 2.54) = 590.55 px
Same physical size. Very different pixel counts.
What DPI Should You Use
DPI determines how many pixels map to one inch of physical space. Pick the wrong value and your design will look wrong in print or on screen.
Web and Screen Design
-
96 DPI - CSS and browser default; 1 cm = ~37.8 px
-
72 DPI - older legacy standard, rarely relevant today
96 DPI is the correct starting point for anything going to a browser or standard monitor.
Print Design
-
300 DPI - professional print standard (brochures, business cards, magazines); 1 cm = ~118 px
-
150 DPI - lower-quality print output (newspapers, draft proofs)
Ask your print shop for their DPI requirement before converting. Don't assume 300 every time.
High-Density Screens (Retina / HiDPI)
On Retina and HiDPI displays, the device pixel ratio (DPR) means one CSS pixel maps to 2 or 3 physical pixels.
The logical resolution still uses 96 DPI as the base. Exported assets typically need 2x or 3x pixel dimensions to look sharp.
CM to PX Conversion Table
At 96 DPI (Web Standard)
|
CM |
PX |
|---|---|
|
0.1 |
3.78 |
|
0.2 |
7.56 |
|
0.3 |
11.34 |
|
0.4 |
15.12 |
|
0.5 |
18.90 |
|
0.6 |
22.68 |
|
0.7 |
26.46 |
|
0.8 |
30.24 |
|
0.9 |
34.02 |
|
1 |
37.80 |
|
1.5 |
56.69 |
|
2 |
75.59 |
|
2.5 |
94.49 |
|
3 |
113.39 |
|
3.5 |
132.28 |
|
4 |
151.18 |
|
4.5 |
170.08 |
|
5 |
188.98 |
|
6 |
226.77 |
|
7 |
264.57 |
|
8 |
302.36 |
|
9 |
340.16 |
|
10 |
377.95 |
|
12 |
453.54 |
|
15 |
566.93 |
|
17 |
641.86 |
|
20 |
755.91 |
|
21 |
793.70 |
|
25 |
944.88 |
|
29.7 |
1122.52 |
|
30 |
1133.86 |
|
35 |
1322.83 |
|
40 |
1511.81 |
|
50 |
1889.76 |
At 300 DPI (Print Standard)
|
CM |
PX |
|---|---|
|
0.1 |
11.81 |
|
0.2 |
23.62 |
|
0.3 |
35.43 |
|
0.5 |
59.06 |
|
1 |
118.11 |
|
1.5 |
177.17 |
|
2 |
236.22 |
|
2.5 |
295.28 |
|
3 |
354.33 |
|
4 |
472.44 |
|
5 |
590.55 |
|
6 |
708.66 |
|
7 |
826.77 |
|
8 |
944.88 |
|
9 |
1062.99 |
|
10 |
1181.10 |
|
12 |
1417.32 |
|
15 |
1771.65 |
|
17 |
2007.87 |
|
20 |
2362.20 |
|
21 |
2480.31 |
|
25 |
2952.76 |
|
29.7 |
3507.87 |
|
30 |
3543.31 |
|
35 |
4133.86 |
|
40 |
4724.41 |
|
50 |
5905.51 |
At 150 DPI (Low-Quality Print)
|
CM |
PX |
|---|---|
|
1 |
59.06 |
|
2 |
118.11 |
|
3 |
177.17 |
|
5 |
295.28 |
|
10 |
590.55 |
|
15 |
885.83 |
|
20 |
1181.10 |
|
21 |
1240.16 |
|
29.7 |
1753.94 |
|
30 |
1771.65 |
|
40 |
2362.20 |
|
50 |
2952.76 |
At 72 DPI (Legacy Screen)
|
CM |
PX |
|---|---|
|
0.5 |
14.17 |
|
1 |
28.35 |
|
1.5 |
42.52 |
|
2 |
56.69 |
|
2.5 |
70.87 |
|
3 |
85.04 |
|
4 |
113.39 |
|
5 |
141.73 |
|
6 |
170.08 |
|
7 |
198.43 |
|
8 |
226.77 |
|
9 |
255.12 |
|
10 |
283.46 |
|
15 |
425.20 |
|
20 |
566.93 |
|
30 |
850.39 |
What is a Pixel
A pixel (px) is the smallest addressable unit on a digital display. Its physical size is not fixed, it changes based on screen pixel density.
CSS Pixels vs. Device Pixels
Two different things, often confused.
-
CSS pixel - the logical unit used in code; stays consistent regardless of zoom or screen type
-
Device pixel - the physical dot on the hardware; varies by device
On a standard 1080p monitor, 1 CSS pixel = 1 device pixel. On a Retina display, 1 CSS pixel = 4 device pixels (2x2 grid).
This is why responsive design and media queries reference CSS pixels, not hardware pixels. Writing width: 10cm directly in CSS is unreliable across devices. Convert to px first.
What is a Centimeter
A centimeter (cm) is a unit of length in the metric system. 1 cm = 0.01 meters.
Unlike a pixel, it is an absolute unit with a fixed physical size. That is exactly why it shows up in print design, product packaging, and physical mockups but rarely in screen-based CSS layouts.
What is DPI (Dots Per Inch)
DPI measures how many pixels (or ink dots) fit into one linear inch of a digital or printed surface.
Higher DPI = more pixels per inch = sharper output. Lower DPI = fewer pixels per inch = coarser result.
DPI vs. PPI
Often used interchangeably. Technically:
-
PPI (Pixels Per Inch) - applies to digital screens
-
DPI (Dots Per Inch) - applies to physical print output
For the cm-to-pixel conversion formula, both terms work identically. The math does not change.
Where CM to PX Conversion is Used
Web and UI Design
Developers working from client specs or print-based wireframes often receive dimensions in centimeters.
Converting to px before writing CSS avoids inconsistent rendering across browsers and devices. Using width: 5cm directly in a stylesheet is unreliable. Use the px value instead.
Graphic Design (Photoshop, Illustrator, Figma)
Assets built for both print and digital need accurate pixel dimensions at the correct DPI.
A mockup created at physical size in centimeters needs px values before it can be coded or exported for screens.
Print-to-Digital Asset Preparation
A standard A4 document (21 x 29.7 cm) at 300 DPI = 2480 x 3508 px.
Get the DPI wrong here and the printed file will be blurry or the digital file will be oversized.
Mobile App Design
UI components often have physical size targets, a tap target of 1.5 cm needs to become a px value before it can go into layout code.
Relevant on both mobile-first design projects and standard desktop layouts where physical mockups drive the spec.
Common CM to PX Values at 96 DPI
Quick reference for the most-used centimeter values at standard web resolution.
-
1 cm = 37.8 px
-
2 cm = 75.6 px
-
5 cm = 188.98 px
-
10 cm = 377.95 px
-
21 cm = 793.7 px (A4 width)
-
29.7 cm = 1122.5 px (A4 height)
At 300 DPI, multiply each value by approximately 3.125.
How to Convert PX Back to CM
The reverse formula: cm = px / (DPI / 2.54)
Or written differently: cm = px x (2.54 / DPI)
378 px at 96 DPI = 378 / (96 / 2.54) = 10 cm
Useful when working with existing screen assets that need to be prepared for print or physical production.
Related Conversions
Other unit conversions commonly needed alongside cm-to-px work:
-
PX to CM Converter - reverse the formula
-
PX to PT Converter - needed for typography and print point sizes
-
PX to Inches Converter - useful for print layout specs
-
RGB to HEX Converter - color format conversion for design files
-
CSS Gradient Generator - build background gradients with correct px dimensions
-
CSS Clamp Calculator - fluid typography using px-based min/max values
-
CSS Border Radius Generator - set rounded corners in px after converting from cm specs
FAQ on CM to PX Converters
How many pixels is 1 cm?
At 96 DPI (standard web resolution), 1 cm = 37.795 px.
At 300 DPI (professional print), 1 cm = 118.11 px. The result always depends on the DPI of your medium, not a fixed ratio.
What is the formula to convert cm to px?
px = cm x (DPI / 2.54)
Divide your DPI by 2.54 to get pixels per centimeter, then multiply by your cm value. For 5 cm at 96 DPI: 5 x 37.795 = 188.98 px.
What DPI should I use for web design?
Use 96 DPI. That is the default pixel density assumed by browsers and most operating systems for screen rendering.
72 DPI is an older standard. Stick to 96 for anything targeting a browser or standard monitor.
What DPI should I use for print?
Use 300 DPI for professional print output: brochures, business cards, magazines, posters.
150 DPI works for lower-quality print like newspapers. Always confirm the DPI requirement with your print shop before converting.
Why can't I just use cm directly in CSS?
You can write width: 5cm in CSS, but browsers assume 96 DPI regardless of the actual screen density.
Results vary across devices and displays. Converting to px first gives you predictable, consistent rendering across all screen resolutions.
What is the difference between DPI and PPI?
PPI (Pixels Per Inch) describes digital screen density. DPI (Dots Per Inch) describes printed dot density.
For the cm-to-pixel conversion formula, both terms apply identically. The math is the same either way.
How do I convert px back to cm?
Use the reverse formula: cm = px x (2.54 / DPI)
So 378 px at 96 DPI = 378 x (2.54 / 96) = 10 cm. Useful when preparing screen assets for physical print production.
Does screen resolution affect cm to px conversion?
Yes. Pixel density changes the output entirely. A 1920x1080 monitor and a 4K monitor at the same physical size have very different pixel densities.
Always match your DPI setting to the actual target device or print medium, not a generic assumption.
How many pixels is an A4 page?
At 96 DPI: 794 x 1123 px. At 300 DPI: 2480 x 3508 px.
A4 measures 21 x 29.7 cm. Use 300 DPI when preparing A4 documents for professional printing to avoid blurry or pixelated output.
Do Retina displays change the cm to px conversion?
The formula stays the same, but device pixel ratio matters for asset export.
On a 2x Retina display, 1 CSS pixel = 4 device pixels. Designs still use 96 DPI as the base, but exported assets need 2x or 3x dimensions to appear sharp.