Skip to content
Utility Calculators

PX to EM Calculator

Verified formula Updated Jun 2026 Private — runs on your device

Enter details
px
Verified formula Private

Value in em

1.5000

For general information only — not financial, tax, legal or medical advice. Verify before you rely on it.

How to use the PX to EM Calculator

The PX to EM Calculator works out your value in em in an instant. Enter value in pixels and base font size and the result updates as you type — it is free, needs no sign-up, and runs entirely in your browser so your figures stay private.

  1. Enter the value in pixels.
  2. Enter the base font size.
  3. Read off your value in em — the calculator updates automatically, with no button to press.

Formula

The PX to EM Calculator uses the formula:

Value in em = Value in pixels ÷ Base font size

Worked example

For example, with value in pixels of 24 and base font size of 16 px, the value in em is 1.5000.

Inputs used
Value in pixels 24
Base font size 16 px
Results
Value in em 1.5000

Results are estimates for educational use, not professional advice.

Frequently asked questions

Divide the pixel value by the base font size. At a 16 px base, 24 px is 1.5 em.

Em is relative to the element's own font size, which by default inherits from its parent, often 16 px.

Em is relative to the element's font size; rem is relative to the root font size, making rem more predictable.

Em scales with context, useful for spacing that should grow with text size, such as padding around a heading.

The PX to EM Calculator uses the formula: Value in em = Value in pixels ÷ Base font size. For example, with value in pixels of 24 and base font size of 16 px, the value in em is 1.5000.

Enter the value in pixels. Enter the base font size. Read off your value in em — the calculator updates automatically, with no button to press.

Related calculators