← Back to Tools

EM ↔ PX Calculator

Instant conversion · Nested EM compounding · Live preview · Reference table

Enter a value to convert
The quick brown fox
💡 EM is relative to the parent element's font-size. REM is relative to the root <html> element (always your base px above).

Add nesting levels to calculate compounding.

💡 The nesting trap: font-size: 0.8em on a child of a child compounds — 0.8 × 0.8 = 0.64em of root. This calculator shows you the real pixel output at each level.

Click any row to load values into the converter.

PXEM / REMCommon Use
💡 62.5% trick: Set html { font-size: 62.5%; } (= 10px on default browser). Then 1rem = 10px, so 1.6rem = 16px. Math becomes trivial.

💡 Tailwind scale uses a 4px base grid. text-base = 16px = 1rem. text-sm = 14px = 0.875rem.