PX・Rem Calculator

Convert px and rem both ways

Common Sizes

Editing either value updates the other

24 ÷ 16 = 1.5rem

Common Values

16px base

1px
0.0625rem
2px
0.125rem
4px
0.25rem
8px
0.5rem
10px
0.625rem
12px
0.75rem
14px
0.875rem
16px
1rem
18px
1.125rem
20px
1.25rem
24px
1.5rem
32px
2rem
40px
2.5rem
48px
3rem
64px
4rem
96px
6rem

What is PX・Rem Calculator?

Work between design pixels and CSS rem values at your root font size. You can also see what 1.5rem is in real pixels.

Use it when moving CSS font sizes and spacing from fixed pixels to rem, or when checking what a rem value means in pixels.

How to Use

  1. Enter a base font size or pick one of the common sizes.
  2. Enter a value in either PX or REM.

The other value and the formula update automatically. Changing the base font size recalculates the value you edited last into the other unit.

Main Settings

Base Font Size

The value used as the basis for 1rem. The browser default is 16px. If your project sets a different font size on html, match that value here.

Common Values

A list of common pixel values with their rem equivalents. Changing the base font size updates the rem column.

Use Cases

  • Replacing pixel values from a design file with CSS rem values
  • Checking what a rem value in existing CSS means in pixels
  • Seeing how sizes change when the root font size changes