Formula
1rem = root px · 1em = element px · 1pt = 96/72 px
Normalize the source unit to CSS reference pixels, then divide by the target unit’s contextual pixel factor.
Convert common CSS lengths only when their required context is explicit. Supply root and current element font sizes so rem and em do not silently assume the same basis.
1rem = root px · 1em = element px · 1pt = 96/72 px
Normalize the source unit to CSS reference pixels, then divide by the target unit’s contextual pixel factor.
This tool assumes the CSS reference relation 1in = 96px and 1pt = 1/72in. Viewport units and percentages are excluded.
Formula v1.0.0
Reviewed 2026-08-03
CalcFlow engineering review
At a 16 px root, 24 px ÷ 16 = 1.5 rem. Under the reference-pixel rule, 24 px also equals 18 pt.
rem uses the root element font size. em uses the current element’s font-size context.
A percentage can depend on different properties and containing blocks, so one scalar context is not sufficient.
Not necessarily. CSS defines a reference pixel that browsers map to device pixels according to display and zoom.