Aspect Ratio Calculator
Resize to a ratio without distorting the image.
CSS pixels to rem, em, pt and percent, both ways.
The browser default is 16px. Change it only if your CSS does.
For the em figure.
| px | rem | em | pt |
|---|
PX to REM Converter moves a CSS value between pixels and rem, and shows em, points and a percentage alongside. The root font size is an input because rem is defined against it: 24px is 1.5rem when the root is the browser default of 16px, but 2.4rem if a stylesheet has set the root to 10px.
The difference between rem and em is which element they look at. rem is always relative to the root, so it gives the same length anywhere in the document. em is relative to the parent's font size, so it compounds: a 0.9em inside a 0.9em is 0.81 of the grandparent. That compounding is occasionally useful for component-local spacing and is usually a source of bugs, which is why rem is the safer default and the parent size is a separate box here.
The accessibility case for rem is the real reason to convert at all. A length in px ignores the font size a user has chosen in their browser settings; a length in rem scales with it. For anyone who has raised that setting -- and many people have -- the same page in rem stays usable while the same page in px stays small.
The page shows its working, not just its answer. Where there is a formula it is printed with your own numbers substituted in, so you can check the result rather than take it on trust -- which is the difference between a calculator you can use for something that matters and one you cannot.
Everything runs inside your browser. What you type is never uploaded, never logged and never stored, and the calculator keeps working if your connection drops after the page has loaded.
The px to rem converter is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
16px in every major browser, unless the user has changed it or your CSS overrides the html element.
rem for type, spacing and layout, because it does not compound. em is occasionally useful for spacing that should scale with a component's own font size.
Setting the root to 62.5% makes it 10px, so 1.4rem is 14px and the mental arithmetic is easier. Enter 10 as the root size to see that scale.
In CSS, 1pt is 1/72 inch and 1px is 1/96 inch, so a point is exactly 1.333 pixels and a pixel is 0.75 points.
If the px to rem converter is not quite what you need, these other free tools solve closely related problems, and there are 11 more in tech calculators.
Resize to a ratio without distorting the image.
Screen PPI, dot pitch and retina distance.
Three calculators: percent of a number, what percent one number is, and change.
Measure contrast between two colours and see which accessibility levels pass.
Format CSS with consistent indentation, spacing and one declaration per line.
Checked and rebuilt on 2026-10-14. The method this calculator uses is described in the section above, and corrections go through the contact page.