Screen pixel density
Calculate display pixel density and aspect ratio from resolution and diagonal size.
Express a CSS pixel size in rem using the actual root font size.
Express a CSS pixel size in rem using the actual root font size.
pixels/root rempixels/root*100 %CSS pixels are layout units, not device pixels. The root size is supplied by you; browser preferences and styles may change it.
Results are rounded for display; calculations use unrounded values. Read our calculation methodology.
Express a CSS pixel size in rem using the actual root font size. A 24 px size at a 16 px root is 1.5 rem. Changing the root while keeping rem fixed changes the rendered CSS size.
A 24 px size at a 16 px root is 1.5 rem. Changing the root while keeping rem fixed changes the rendered CSS size.
| Input | Example |
|---|---|
CSS size (px) pixels | 24 |
Root font size (px) root | 16 |
CSS pixels are layout units, not device pixels. The root size is supplied by you; browser preferences and styles may change it.
Start with the labelled example. Keep units consistent, calculate without intermediate rounding and change one input at a time. The diagram explains the model; the result table supplies the numerical answer.