⚡ Try PakhiPDF Pro — Unlimited tools, zero ads. Upgrade Free →
CSS Unit Converter

REM to EM Converter

Convert CSS rem to em units with custom root and parent font sizes. Understand the key difference between REM and EM.

? Custom Root Font Size? Custom Parent Font Size? Real-time Results
gradient

REM ? EM Calculator

Browser default = 16px

The font-size of the nearest parent element

Result

1.0000 em

Formula: (1 - 16) - 16 = 1.0000em

Formula

EM = (REM - Root Font Size) - Parent Font Size

Example: (1.5rem - 16px) - 20px = 1.2em

gradient

Want to start investing in crypto now?

Discover how specific cryptocurrencies work — and get a bit of each crypto to try out for yourself.

Start Earning

What is REM to EM Conversion?

A REM to EM converter helps web developers translate between two of CSS's most important relative units. Both are relative, but they reference different anchors: REM always looks at the root <html> element's font size (global, consistent), while EM looks at the nearest parent element's font size (contextual, can compound). Knowing how to convert between them is essential for CSS refactoring, design system migrations, and understanding nested component behaviour.

REM vs EM: Key Differences

FeatureREMEM
ReferenceRoot <html> elementNearest parent element
ConsistencyGlobal - same everywhereContextual - varies by parent
Nesting effectNo compoundingCompounds with each nesting level
Best forGlobal type scale, spacingButton padding, icon sizing
DebuggingEasy - one referenceHarder - trace the DOM tree
Tailwind CSSUses rem by defaultAvailable via config

REM to EM Conversion Table (Root 16px)

REMPXEM (parent=16px)EM (parent=20px)
0.5rem8px0.5em0.4em
0.75rem12px0.75em0.6em
1rem16px1em0.8em
1.25rem20px1.25em1em
1.5rem24px1.5em1.2em
2rem32px2em1.6em
3rem48px3em2.4em

When to Use REM vs EM

Use REM for...

  • Global typography (h1-h6, body, p)
  • Spacing tokens in design systems
  • Layout margins and padding
  • Media query font scaling
  • Any sizing you want consistent site-wide

Use EM for...

  • Button padding that scales with button text
  • Icon sizes relative to surrounding text
  • Line-height within text components
  • Component-internal spacing (badges, tags)
  • Proportional scaling to parent context

Frequently Asked Questions

Related Tools