Skip to main content
SiteIndex
UtilitiesReady to use

PX to REM Converter & Calculator

Convert px to rem or rem to px for CSS, using the root font size configured in your project.

Guide

Interactive workspace

No account required
PX / REM Calculator

24px =

1.5rem

How it's calculated

rem = px ÷ root font size

24px ÷ 16px = 1.5rem

24px = 1.5rem

REM uses the root font size, not the parent font size.

Quick reference · 16px
All units at once
24px (px)font-size: 24px;
1.5rem (rem)font-size: 1.5rem;
1.5em (em)font-size: 1.5em;
150% (% of root)font-size: 150%;
18pt (pt)font-size: 18pt;

24px

The quick brown fox

1.5rem

The quick brown fox

Typography scale · 16px
Use casepxrem
Caption0.75rem
Body1rem
Subheading1.5rem
Heading2rem
Large heading3rem
Display4rem
Batch CSS: convert a whole stylesheet

Paste CSS and every px length is rewritten in rem at the current root size. Values inside url(...) and quoted strings are left alone, and 0px becomes 0.

Results and sharing

Review the conversion and formula, copy the CSS-ready value, or select a reference size. Swap PX/REM to reverse. REM uses root font size; EM uses parent font size.

Use Share result to preview and copy a link. Anyone with the link can read the included details; nothing is saved on our server. Shared result links open read-only snapshots. Large results require a downloaded file instead.

How to use it

  1. Choose px to rem, rem to px, px to em, or pt to px.
  2. Enter the value and set the root or parent font size when applicable.
  3. Read the conversion and formula, or select a common reference value.
  4. Copy the CSS-ready result, or swap px and rem units to convert back.
What is PX / REM Calculator?

Convert px to rem and rem to px with a configurable base font size, or switch to px to em for sizing relative to a parent font.

How it works

SiteIndex divides or multiplies by the configured font size (16px by default). REM uses the root font size; EM uses the parent font size. PT converts at the CSS reference ratio of 96px per 72pt.

PX to REM conversion table

At a 16px base font size, rem = px ÷ 16. The calculator lets you change this base for your project.

PX to REM conversion table
PixelsREM
1px0.0625rem
2px0.125rem
4px0.25rem
6px0.375rem
8px0.5rem
10px0.625rem
12px0.75rem
13px0.8125rem
14px0.875rem
15px0.9375rem
16px1rem
18px1.125rem
20px1.25rem
22px1.375rem
24px1.5rem
26px1.625rem
28px1.75rem
30px1.875rem
32px2rem
36px2.25rem
40px2.5rem
44px2.75rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem
128px8rem

REM to PX conversion table

At a 16px root font size: px = rem × 16. Choose another base in the calculator when your project uses a different root size.

REM to PX conversion table
REMPixels
0.125rem2px
0.25rem4px
0.5rem8px
0.625rem10px
0.75rem12px
0.875rem14px
1rem16px
1.125rem18px
1.25rem20px
1.5rem24px
1.75rem28px
2rem32px
2.5rem40px
3rem48px
4rem64px
5rem80px

rem vs em vs px: when to use which

rem scales from the document root font size, so it is useful for consistent typography and spacing. em scales from the current element's font size (or its parent for properties such as font-size), which can be useful for component-relative sizing. px is a fixed CSS reference unit and suits fine details such as borders. In CSS, one point equals 4/3 pixels, so use the PT to PX mode for this fixed conversion. Prefer the unit whose scaling behavior matches the design.

Common uses
  • Convert a design's pixel spacing into rem units for a CSS design system.
  • Check what a rem value equals in pixels at a custom base font size.
  • Build a quick reference table of common px-to-rem conversions.
Limitations
  • Results depend on the browser, network, input, and external service involved.
  • This tool is informational and does not replace specialist diagnostics or professional advice.
Frequently asked questions
How do I convert px to rem?
Divide the pixel value by the root font size. With the browser default of 16px, rem = px ÷ 16, so 24px = 1.5rem and 32px = 2rem.
What is 16px in rem?
16px equals 1rem at the default 16px root font size. Common values: 12px = 0.75rem, 14px = 0.875rem, 18px = 1.125rem, 20px = 1.25rem, 24px = 1.5rem.
How do I convert rem to px?
Multiply the rem value by the root font size. At 16px, 1.5rem = 24px and 2.5rem = 40px.
What if my project uses a different base font size?
You can change the root font size used for the conversion; 16px is the common browser default.
What is 24px in rem?
At the common 16px root font size, 24px equals 1.5rem. Change the base font size in the calculator to match your project.

Related tools