Unit-To-Unit Pixels conversion www.cupandgear.com

REM to PX

1 rem = 16 CSS pixels

Multiplying by the root size tells you the rendered pixel value of a rem-based design. Under the common 62.5 percent root trick the base becomes 10 px, so 1.6rem is the familiar 16 px.

Formula px = rem × 16

=

Type in either field — the other updates on every keystroke. Need other units? Open the full pixels converter.

REM to PX — quick reference
Root emCSS pixel
1 rem16 px
2 rem32 px
3 rem48 px
4 rem64 px
5 rem80 px
10 rem160 px
15 rem240 px
20 rem320 px
25 rem400 px
50 rem800 px
100 rem1600 px
500 rem8000 px
1000 rem16000 px
PX to REM — reverse
CSS pixelRoot em
1 px0.0625 rem
2 px0.125 rem
3 px0.1875 rem
4 px0.25 rem
5 px0.3125 rem
10 px0.625 rem
15 px0.9375 rem
20 px1.25 rem
25 px1.5625 rem
50 px3.125 rem
100 px6.25 rem
500 px31.25 rem
1000 px62.5 rem

Worked examples

Common values
SituationFromTo
Caption0.75 rem12 px
Small text0.875 rem14 px
Body text1 rem16 px
Large body1.125 rem18 px
Heading2 rem32 px
Hero3 rem48 px

How rem is calculated

Design tools such as Figma work in pixels, while stylesheets use rem.

A rem is a multiple of the root element's font size, that is the font size set on the html element. Browsers default this to 16 px, so 1 rem is 16 px, 0.5 rem is 8 px, 1.5 rem is 24 px and 2 rem is 32 px. If a stylesheet sets html { font-size: 62.5% } the root becomes 10 px and 1 rem is 10 px, which makes the arithmetic easy but requires you to restore body text size explicitly.

Because rem depends on the root size, the same CSS value can be a different number of pixels on different devices. A user who sets the browser's default font size to 20 px gets 1 rem = 20 px, and every rem-sized element on the page grows with it. That is the point of using rem: it respects the user's choice.

rem versus em versus px

The em unit is relative to the font size of the current element, so nested elements compound: a 1.2 em child inside a 1.2 em parent is 1.44 em of the grandparent. Rem avoids that by always looking at the root. Pixels are absolute CSS units and do not scale with the user's font settings, which is why accessibility guidance favours rem for font sizes and spacing.

A common pattern is to size text, padding and margins in rem and use px for borders and hairlines, which should stay thin. Use em for components that should scale with their own font size, such as the padding inside a button.

Accessibility and zoom

WCAG success criterion 1.4.4 requires that text can be resized up to 200 percent without loss of content or functionality. Layouts built with rem handle this well, since a larger root size scales the whole interface. Layouts built with fixed pixels often break at large sizes or ignore the browser setting altogether.

Media queries are another place where units matter. Breakpoints written in em or rem respond to the user's font size, so a layout can switch to a single column when text gets large, while breakpoints in px respond only to the viewport width.

Practical conversion table

Common sizes at the default 16 px root are: 0.75 rem = 12 px (small print), 0.875 rem = 14 px, 1 rem = 16 px (body text), 1.125 rem = 18 px, 1.25 rem = 20 px, 1.5 rem = 24 px (subheading), 2 rem = 32 px and 3 rem = 48 px. If your project changes the root size, set it in the converter above and every result updates. When designing a fluid scale, the clamp() function can mix rem with viewport units, for example clamp(1rem, 2.5vw, 2rem).

Building a type scale with rem

A type scale is a set of sizes that grow by a constant ratio, which gives a page visual rhythm. Starting from 1 rem (16 px) and multiplying by 1.25 gives 1.25 rem (20 px), 1.5625 rem (25 px), 1.953 rem (31.25 px) and 2.441 rem (39 px). The classic ratios are 1.125, 1.2, 1.25, 1.333 and 1.5, and each gives a different feel from subtle to dramatic.

Define the scale once as CSS variables, for example --step-1: 1.25rem, and use them everywhere. Because they are in rem, the whole scale grows if a user raises the browser's default font size. You can also use clamp() to make headings fluid between a minimum and a maximum rem value without using fixed breakpoints.

Rem to pixels at a 16 px root
SituationFromTo
Small print0.75 rem12 px
Body text1 rem16 px
Large body1.125 rem18 px
Subheading1.5 rem24 px
Heading2 rem32 px
Display heading3 rem48 px
Page gutter4 rem64 px

Mental-math shortcut and common mistakes

Multiply by 16. For 1.5 rem, add half of 16 to 16 to get 24 px.

Background

The rem unit came with CSS3 to avoid the compounding that em units cause in nested elements. Its name stands for root em.

Learn more

By default 1 rem is 16 px, set by the browser's root font size. If a user raises their default font size, every rem value grows with it, while px values stay fixed.

Related guides: Digital and print layout units: px, rem, em, points and DPI · Unit conversion formulas by category · Where unit conversions come up in daily life

Frequently asked

How many CSS pixels are in a rem?
1 rem = 16 CSS pixels. In the other direction, 1 CSS pixel = 0.0625 rem.
What is a rem?
A rem is the root element’s font size — 16 px in every browser by default, though stylesheets frequently override it. Sizing in rem lets a whole layout scale with the user’s chosen text size.
What is a CSS pixel?
A CSS pixel is a reference unit of 1/96 inch, not a physical device pixel. Browsers scale it by the device pixel ratio, so one CSS pixel may cover four hardware pixels on a 2× display.
How many pixels is 1.5 rem?
1.5 rem is 24 px at the default 16 px root size.
How many px is 1 rem?
At the default root size, 1 rem is 16 px.
Why use rem instead of px?
Rem scales with the user's font-size setting, which helps accessibility. Px does not.
What does html { font-size: 62.5% } do?
It sets the root size to 10 px, so 1 rem equals 10 px, which makes conversions easier.