PakhiPDF free online PDF AI and digital tools platform

Free. No Sign-Up Required. No Limits. Read More

gradient

REM to EM Converter

Quickly convert CSS rem units to em units.

EM Value: 0.00

Note: REM is relative to the HTML root font size. EM is relative to its parent element's font size. To convert REM to EM, we first convert REM to PX using the root font size, then convert that PX value to EM using the parent font size.

Formula: EM = (REM Value * Root Font Size) / Parent Font Size

What is a REM to EM Converter?

A REM to EM converter helps web developers translate between two relative CSS length units that behave differently depending on context. While both rem and em are relative units, rem always references the root <html> element's font size, whereas em is relative to the font size of its nearest parent element. This distinction is critical when building nested components where inherited font sizes compound. For a deeper understanding of how these units interact, see the MDN Web Docs on font-size.

How REM to EM Conversion Works

Converting REM to EM requires knowing two values: the root font size and the parent element's font size. The process first resolves the REM value to pixels, then divides by the parent font size to get the EM equivalent:

EM = REM × (Root Font Size ÷ Parent Font Size)

When the root and parent font sizes are both 16px (the common default), 1rem equals exactly 1em. However, if a parent element has font-size: 20px while the root remains 16px, then 1rem = 16px converts to 16 ÷ 20 = 0.8em in that context.

REM to EM Conversion Table

REM EM (root=16px, parent=16px) EM (root=16px, parent=20px)
0.5rem0.5em0.4em
0.75rem0.75em0.6em
1rem1em0.8em
1.5rem1.5em1.2em
2rem2em1.6em
3rem3em2.4em

Best Practices for REM vs EM

FAQs

What is the difference between REM and EM?

REM (root em) is always calculated relative to the root <html> element's font size, making it consistent across the entire page. EM is relative to the font size of the element's direct parent, which means it can produce different pixel values depending on where it's used in the DOM tree.

When are REM and EM equal?

REM and EM produce the same pixel value when the parent element's font size matches the root font size. With default browser settings (16px root) and no custom font sizes on parent elements, 1rem and 1em both resolve to 16px.

Why do EM values compound in nested elements?

Because EM is relative to the parent's computed font size, each nesting level multiplies the effect. If a parent has font-size: 1.2em and its child also uses 1.2em, the child's computed size becomes 1.2 × 1.2 = 1.44 times the grandparent's font size. This compounding is the main reason many developers prefer REM for most sizing.

Should I always use REM over EM?

Not necessarily. EM is ideal for component-scoped sizing where you want elements to scale proportionally with their container's font size — for example, padding inside a button that should grow when the button text gets larger. REM is better for global consistency. Most modern CSS architectures use a combination of both.

Related Tools