About this calculator
Enter a value and the root font size, usually 16 px.
How to use it
- Choose the direction.
- Enter the value.
- Enter the root font size.
The formula
- root font size
- the html element’s font size, 16 px by default
Worked example
24 px at a 16 px root
- 24 ÷ 16 = 1.5rem.
What the result means
Using rem for text and spacing helps accessibility.
Values not in the built-in table, at 16 px and 10 px roots
The calculator lists common text sizes for your root. These are other values often needed for borders, spacing and large headings. The 10 px column applies when a site sets html { font-size: 62.5%; }.
| px | rem at 16 px root | rem at 10 px root |
|---|---|---|
| 1px | 0.0625rem | 0.1rem |
| 2px | 0.125rem | 0.2rem |
| 4px | 0.25rem | 0.4rem |
| 8px | 0.5rem | 0.8rem |
| 13px | 0.8125rem | 1.3rem |
| 15px | 0.9375rem | 1.5rem |
| 22px | 1.375rem | 2.2rem |
| 36px | 2.25rem | 3.6rem |
| 56px | 3.5rem | 5.6rem |
| 72px | 4.5rem | 7.2rem |
| 96px | 6rem | 9.6rem |
| 120px | 7.5rem | 12rem |
Example: converting a card design to rem
A design shows a card 320 px wide with 24 px padding, a 20 px heading and 18 px body text. At a 16 px root that is max-width: 20rem, padding: 1.5rem, a 1.25rem heading and 1.125rem body text. If a reader sets a 20 px default text size, the card becomes 400 px wide with 30 px padding, growing with the text.
Common mistakes
- Assuming the root is always 16 px. Check the CSS for a font-size on html.
- Using rem in media queries and expecting the html font size to apply. In media queries, rem and em are based on the browser’s default text size, not the html element’s font size.
- Mixing up rem and em: 1.5em inside a 1.5em parent is 2.25 times the base; 1.5rem is always 1.5 times the root.
Assumptions
- Root size in pixels.
Limitations
- em units depend on the parent element instead.
Frequently asked questions
How many px is 1 rem?
16 px by default.
What is 14 px in rem?
0.875rem at a 16 px root.
rem or em?
rem is relative to the root; em to the parent.
What does font-size: 62.5% on html do?
It sets the root to 62.5% of the default 16 px, which is 10 px, so 1rem = 10 px and conversions become simple. Enter 10 as the root font size to convert for such a site.
Does browser zoom affect rem and px differently?
Page zoom scales both equally. Changing the browser’s default font size setting changes rem-based sizes but leaves px-based sizes fixed, which is the main reason to use rem.
Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.

