Pixels (CSS px) to rem (relative to root font size) Converter
1 px equals 0.0625 rem, and 1 rem equals 16 px. Enter a value in either box to convert pixels (css px) to rem (relative to root font size) and back. Formula: CSS defines 1 in = 96 px = 72 pt = 6 pc; rem and em = px / base font size (default 16 px).
· CalcFlow Editorial
16 px = 1 rem
Results shown are estimates for informational purposes only. Nothing on CalcFlow is financial, tax, legal, or medical advice. Always consult a qualified professional before making important decisions.
Pixels (CSS px) to rem (relative to root font size) Conversion Table
| Pixels (CSS px) | rem (relative to root font size) |
|---|---|
| 8 px | 0.5 rem |
| 10 px | 0.625 rem |
| 12 px | 0.75 rem |
| 14 px | 0.875 rem |
| 16 px | 1 rem |
| 18 px | 1.125 rem |
| 24 px | 1.5 rem |
| 32 px | 2 rem |
| 48 px | 3 rem |
rem (relative to root font size) to Pixels (CSS px) Conversion Table
| rem (relative to root font size) | Pixels (CSS px) |
|---|---|
| 8 rem | 128 px |
| 10 rem | 160 px |
| 12 rem | 192 px |
| 14 rem | 224 px |
| 16 rem | 256 px |
| 18 rem | 288 px |
| 24 rem | 384 px |
| 32 rem | 512 px |
| 48 rem | 768 px |
Worked example: 10 px = 0.625 rem. 24 px at a 16 px base is 24 / 16 = 1.5 rem. A 12 pt print font is 12 x 96 / 72 = 16 px.
Need other units? Open the full Typography and CSS Unit Converter.
Popular Typography Conversions
Formula
CSS defines 1 in = 96 px = 72 pt = 6 pc; rem and em = px / base font size (default 16 px)Understanding Typography Conversion
On the web, CSS fixes the reference pixel at 1/96 of an inch, a point at 1/72 of an inch and a pica at 12 points, so 1 inch is 96 px, 72 pt and 6 pc. Relative units such as em and rem scale with a base font size, which browsers set to 16 pixels by default. Using rem for type and spacing keeps a layout responsive to the reader's font preference.
Tips and Best Practices
- 1At the default 16 px base, 1 rem is 16 px and 0.75 rem is 12 px.
- 2Divide px by the base size for rem; multiply rem by the base size for px.
- 3Use rem for font sizes so users who raise their browser font size get larger text.
Real-World Example
24 px at a 16 px base is 24 / 16 = 1.5 rem. A 12 pt print font is 12 x 96 / 72 = 16 px.
Common Mistakes to Avoid
- Assuming 1 em always equals 16 px; em depends on the parent element font size, and the base here is adjustable.
- Treating a CSS pixel as a physical device pixel on high density screens.
- Using pt on screens when the design brief is in px.
How to Use
- Type a number in the Pixels (CSS px) box.
- The rem (relative to root font size) result appears instantly; you can also edit the rem (relative to root font size) box to convert backwards.
- Use the swap button to reverse the direction and Copy result to copy the answer.
Frequently Asked Questions
How many rem (relative to root font size) are in 1 px?
How many pixels (css px) are in 1 rem?
What is the formula to convert pixels (css px) to rem (relative to root font size)?
How many px is 1 pt?
Sources: CSS Values and Units Module Level 3/4 (W3C): 1in = 96px = 2.54cm, 1pt = 1/72in, 1pc = 12pt.