Convert
Browsers default to 16px. Use 10 if your CSS sets html { font-size: 62.5% }.
Points
18 pt
Percent
150%
EM at root
1.5 em
font-size: 1.5rem;Root font size must be greater than zero.
Convert pixels to rem and back at any root font size, with points, percentages and CSS you can copy.
Browsers default to 16px. Use 10 if your CSS sets html { font-size: 62.5% }.
Points
18 pt
Percent
150%
EM at root
1.5 em
font-size: 1.5rem;Root font size must be greater than zero.
At a 16px root. Tap a row to load it.
| PX | REM | PT |
|---|---|---|
| 8px | 0.5rem | 6pt |
| 10px | 0.625rem | 7.5pt |
| 12px | 0.75rem | 9pt |
| 13px | 0.8125rem | 9.75pt |
| 14px | 0.875rem | 10.5pt |
| 15px | 0.9375rem | 11.25pt |
| 16px | 1rem | 12pt |
| 18px | 1.125rem | 13.5pt |
| 20px | 1.25rem | 15pt |
| 24px | 1.5rem | 18pt |
| 28px | 1.75rem | 21pt |
| 32px | 2rem | 24pt |
| 36px | 2.25rem | 27pt |
| 40px | 2.5rem | 30pt |
| 48px | 3rem | 36pt |
| 56px | 3.5rem | 42pt |
| 64px | 4rem | 48pt |
| 72px | 4.5rem | 54pt |
| 96px | 6rem | 72pt |
A rem is one multiple of the root element's font size. The conversion is a single division: rem = px ÷ root font size. At the 16px browser default, 1rem is 16px, 0.5rem is 8px and 3rem is 48px.
When you change the root font size, the pixel value you entered stays fixed and the rem value is recalculated — the question is usually “what rem gives me this pixel size under my CSS?” Points use the fixed CSS relationship of 0.75pt per pixel, and percent shows the size relative to the root, which is how percentage font sizes behave on the html element.
Divide the pixel value by the root font size. With the browser default root of 16px, 24px ÷ 16 = 1.5rem and 14px ÷ 16 = 0.875rem. To go back, multiply: 2rem × 16 = 32px. If your stylesheet changes the root font size, enter that value above and every result updates.
Every major browser ships with a default font size of 16px, and 1rem equals the font size of the root html element. Users can change that default in their browser settings, which is exactly why rem is useful: sizes set in rem scale with the user's choice, while sizes set in px do not.
rem is relative to the root html element, so 1.5rem is the same size everywhere on the page. em is relative to the font size of the element's parent, so nested ems compound: 1.2em inside 1.2em is 1.44 times the root. rem is predictable for type scales and spacing; em suits values that should grow with their component, such as padding on a button.
Many people with low vision raise their browser's default font size. Text sized in rem respects that setting; text sized in px ignores it and stays small. Using rem for type, and often for spacing, is a straightforward way to support WCAG success criterion 1.4.4, Resize Text.
Setting html { font-size: 62.5% } makes the root 10px in a default browser, so 1.6rem is 16px and the mental maths becomes easy. It still respects user font preferences because it is a percentage. The trade-off is that every component must set its own font size, since anything unstyled inherits 10px text. Set the root font size above to 10 to calculate with it.
CSS defines 1 inch as 96px and as 72pt, so 1px equals 0.75pt and 16px equals 12pt. That fixed relationship is why a 12pt font in a design tool corresponds to 16px on the web. Physical print size still depends on the device and its resolution.
Install Calculatory
Add to your home screen for offline access and faster opening.