PX to REM Converter

rem units scale with the root font size, which makes layouts respect users’ text-size settings. Designers often work in pixels and convert.

Convert
Browsers use 16 px unless the site changes it.
Results update as you type.

rem

1.5rem

Common sizes at a 16 px root

Common sizes at a 16 px root
pxrem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
40px2.5rem
48px3rem
64px4rem

About this calculator

Enter a value and the root font size, usually 16 px.

How to use it

  1. Choose the direction.
  2. Enter the value.
  3. Enter the root font size.

The formula

rem = px ÷ root font size; px = rem × root font size
root font size
the html element’s font size, 16 px by default

Worked example

24 px at a 16 px root

  1. 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 to rem at two root sizes
pxrem at 16 px rootrem at 10 px root
1px0.0625rem0.1rem
2px0.125rem0.2rem
4px0.25rem0.4rem
8px0.5rem0.8rem
13px0.8125rem1.3rem
15px0.9375rem1.5rem
22px1.375rem2.2rem
36px2.25rem3.6rem
56px3.5rem5.6rem
72px4.5rem7.2rem
96px6rem9.6rem
120px7.5rem12rem

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.