📐
developer

EM REM Calculator

Convert between px, em, and rem CSS units. Set custom root and parent font sizes with a reference table.

em rem calculatorpx to rempx to emcss unit converterrem calculator

EM / REM calculator

Convert between px, em, and rem units

Set your base font size and convert between CSS units instantly.

Reference table

pxrememPreview

How to use

How to Use the EM REM Calculator

  1. 1 Set the root font size (browser default is 16px) — this is used for rem calculations.
  2. 2 Set the parent font size — this is used for em calculations (em is relative to parent).
  3. 3 Enter a value in any field (px, rem, or em) — the other two fields update automatically.
  4. 4 Scroll down to see the reference table with common sizes and visual previews.
  5. 5 Click any row in the reference table to populate the converter fields.

REM (root em) units are relative to the root element's font size (usually the html element, defaulting to 16px). EM units are relative to the parent element's font size. So 1rem always equals the root font size, while 1em equals whatever the parent's font size is. This distinction matters when nesting elements — ems compound while rems stay consistent.

Using rem units is a best practice for responsive design because they respect the user's browser font size settings. If a user sets their default to 20px instead of 16px, all rem-based sizes scale proportionally. The common conversion at 16px base: 1rem = 16px, 0.875rem = 14px, 1.125rem = 18px, 1.5rem = 24px.

More Developer tools

Related tools

You might also like