Font Size Converter
Convert font sizes between px, pt, em, rem and percent using the CSS 96 px per inch and 72 pt per inch definitions, with any root or parent size.
Font Size Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: rem = px / base | pt = px × 0.75 | em = px / parent
Worked example — 1.5rem = 18pt = 150%
Formula
rem = px / base | pt = px × 0.75 | em = px / parent
1 rem = root font size (default 16px). 1 pt = 1/72 inch. At 96 DPI, 1px = 0.75pt.
Worked Examples
Example 1: 24px heading to rem and pt
Problem:Convert a 24px heading with a 16px root font size.
Solution:rem = 24 / 16 = 1.5rem pt = 24 x 0.75 = 18pt (1px = 1/96 in, 1pt = 1/72 in, so 1px = 0.75pt) percent = 24 / 16 x 100 = 150%
Result:1.5rem = 18pt = 150%
Example 2: Print 12pt body text on screen
Problem:A print stylesheet specifies 12pt. What is that in CSS pixels and rem?
Solution:px = 12 / 0.75 = 16px rem = 16 / 16 = 1rem (default root) This is why 16px is the usual browser default: it equals the classic 12pt body size
Result:12pt = 16px = 1rem
Example 3: Nested em values compound
Problem:A container is 20px, a child uses font-size: 0.8em and a grandchild inside it also uses 0.8em. What sizes render?
Solution:Child = 20 x 0.8 = 16px Grandchild = 16 x 0.8 = 12.8px With rem instead: 0.8rem = 16 x 0.8 = 12.8px at every depth (root 16px), no compounding
Result:Child 16px, grandchild 12.8px; 0.8rem would be 12.8px everywhere
Frequently Asked Questions
What is the difference between px, em, and rem?
px is absolute. em is relative to the parent element font size. rem is relative to the root element (html) font size, typically 16px.
Why should I use rem instead of px for web typography?
rem units scale with the user's browser font size preference, improving accessibility. Users who set their browser to larger text (common among people with low vision) will see all rem-based text grow proportionally. px values stay fixed and ignore these preferences, making them less accessible.
What is the standard base font size for websites?
Most browsers default to 16px as the root font size. Web designers often keep this default and build their type scale around it. Common sizes: body text at 16px (1rem), H1 at 32–48px, H2 at 24–32px, small print at 12–14px (0.75–0.875rem).
How do I convert points to pixels for screen design?
At 96 DPI (standard screen resolution), 1 point equals 1.333 pixels, or equivalently 1 pixel equals 0.75 points. So 12pt body text equals 16px, and 24pt equals 32px. This relationship changes at higher DPI displays like Retina screens.
Why do em values compound when elements are nested?
An em resolves against the computed font size of its parent, not the document root, so the multipliers stack. A list item set to 0.9em inside another list at 0.9em inside a third at 0.9em computes to 0.9 cubed, about 0.729 of the original, so 16px shrinks to roughly 11.7px without anyone writing a small value. rem was introduced precisely to break this chain, since it always resolves against the html element regardless of nesting depth.
When is em the better unit to reach for instead of rem?
Use em when a value should scale with the element it belongs to. Padding, margins, border-radius and icon sizes inside a button all read naturally in em, because setting the button font size once rescales the whole component in proportion. Media query breakpoints and the type scale itself are better in rem, so a nested component never drifts. A common pattern is a rem font size on the component root and em for everything measured inside it.
How does clamp with viewport units produce fluid type?
clamp(min, preferred, max) returns the preferred value unless it falls outside the bounds. Writing clamp(1rem, 0.5rem + 1vw, 1.5rem) gives a size that grows with the viewport width, since 1vw is one percent of it, but never drops below 16px or rises above 24px at a 16px root. Keeping a rem term in the middle expression matters for accessibility: a purely vw-based size ignores the user browser font size setting entirely.
Are cm, mm and in reliable units on screen?
Only in print stylesheets. CSS anchors the absolute units to one inch equalling exactly 96 pixels, so 1cm computes to 96 divided by 2.54, about 37.795px, and 1mm to roughly 3.78px, whatever the physical size of the display. Asking a phone for a 1cm heading gives you 37.795 CSS pixels, not a centimetre you could measure with a ruler. When printing, the same units do map to real paper dimensions, which is why they survive in the specification.
Why is a CSS pixel not the same as a hardware pixel?
CSS defines the px as a reference unit tied to a visual angle of about 0.0213 degrees at a standard viewing distance, not to a physical dot. On a display with a device pixel ratio of 3, one CSS pixel is painted using nine hardware pixels, which is why text looks sharper rather than smaller on a high-density screen. The practical consequence is that 16px means roughly the same apparent size across devices, and that image assets need 2x or 3x variants while type does not.
What do the ex and ch units measure?
Both are font-relative rather than size-relative. One ex is the x-height of the current font, the height of a lowercase x, and one ch is the advance width of the digit zero. Because x-height varies widely between typefaces at the same point size, ex is useful for vertical adjustments such as superscript offsets that should track the actual letterforms. ch is most often used to cap line length, since a max-width around 60ch approximates the 60 to 75 character measure typographers recommend for readable body text.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Related Calculators
🧮Line Spacing Calculator
Calculate optimal line height/leading from font size for readability.
🧮Print Size From Megapixels Calculator
Calculate print size from megapixels with interactive inputs and clear steps.
🧮Font Scale Modular Typography Calculator
Calculate font scale modular typography with interactive inputs and clear steps.
🧮RGB Hex Converter
Calculate rgb hex converter with interactive inputs and clear steps.
🧮Print Size Calculator
Calculate maximum print size from image resolution and desired DPI.
🧮Audio File Size Calculator
Calculate audio file size from duration, sample rate, bit depth, and number of channels.
🧮Frequency to Note Converter
Convert frequency in Hz to the nearest musical note and cents deviation.
🧮Frame Rate Converter
Convert between frame rates (24, 25, 30, 60 fps) and calculate time remapping.