Calculating your value in em is straightforward once you know the PX to EM formula and what each input means. This guide explains the method in plain language, walks through a manual calculation, and gives worked examples you can follow — then you can do it instantly with the PX to EM Calculator.
What is PX to EM?
The PX to EM calculation tells you your value in em from a few simple inputs. The figure you are solving for here is the value in em.
The PX to EM formula
The core formula is:
Value in em = Value in pixels ÷ Base font size
Here is what each input means:
- Value in pixels — a number. Example: 24.
- Base font size — a value measured in px. Example: 16 px.
How to calculate it step by step
- Write down the value in pixels (for example, 24).
- Write down the base font size (for example, 16 px).
- Apply the formula above to get your value in em.
- Double-check the result with the PX to EM Calculator.
Worked examples
Example 1
| Input / Output | Value |
|---|---|
| Value in pixels | 24 |
| Base font size | 16 px |
| Value in em | 1.5000 |
With value in pixels of 24 and base font size of 16 px, the value in em works out to 1.5000.
Example 2
With value in pixels of 48 and base font size of 16 px, the value in em works out to 3.0000.
| Result | Value |
|---|---|
| Value in em | 3.0000 |
Example 3
With value in pixels of 12 and base font size of 16 px, the value in em works out to 0.7500.
| Result | Value |
|---|---|
| Value in em | 0.7500 |
Tips for an accurate result
- Keep your units consistent — mixing, say, months with years or grams with kilograms is the most common source of error.
- Round only at the very end. Rounding inputs early can shift the final answer noticeably.
- Re-run the numbers whenever an input changes, rather than estimating from an old result.
Prefer not to do the maths by hand? — the PX to EM Calculator does it instantly, for free, with the formula and a worked example built in.
Related calculators
Continue exploring utility calculators with these tools: Bleach Dilution Calculator, Pool Chlorine Calculator, Age Calculator, Percentage Calculator, Date Difference Calculator.