Math & Calculators

Typography

All tools

Turn a pixel font size into points, em and rem based on your root size.

How it works

Four simple steps

1

Enter pixels

Type the font size from the design file.

2

Set the root size

Use 16 unless your site changes the html font size.

3

Read conversions

Points, em and rem update as you type.

4

Copy for CSS

Paste the rem value into your stylesheet.

Typography

About Typography

The brand guide lists heading sizes in points, the design file uses pixels, and your stylesheet is written in rem. Translating between the three for every heading level gets old quickly. Typography converts one size into all of them.

Enter a size in pixels and the root font size in pixels (16 by default, the usual browser default). The output shows the pixel value, the equivalent in points at 0.75 pt per pixel, and em and rem values found by dividing the pixel size by the root size. With the defaults, 24 px is 18 pt, 1.5 em and 1.5 rem.

The em figure assumes the parent element uses the root size. In real CSS, em is relative to the parent's computed font size, so a 1.5 em heading inside a container set to 0.875 rem ends up smaller than expected. If you nest components, prefer rem for font sizes and keep em for spacing that should scale with the local text. The points conversion follows the CSS definition of 96 pixels per inch and 72 points per inch, which matches what most design tools assume.

For whole tables of px and rem values, the px to rem converter is quicker, and the responsive helper builds clamp() rules for fluid type. Screen sizes and ratios are in the resolution calculator. The conversion is simple arithmetic in your browser.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Both are calculated against the root size you enter, which is correct for rem and for em only when the parent element uses the root size. If the parent has a different font size, divide by that size instead to get the em value.

Divide points by 0.75, or multiply by 4/3. For example, 12 pt is 16 px. Enter the pixel result here to see the matching rem value.

Use 16 unless your stylesheet sets a different font size on the html element. Some projects use 62.5 percent so that 1 rem equals 10 px; in that case enter 10.

View more FAQs

Related tools

View all

Unit Converter

Convert units of measurement.

Open

Number Base Converter

Binary, Octal, Hex conversions.

Open

Percentage Calculator

Calculate percentages quickly.

Open

Discount, VAT & Tip Calculator

Add discounts, tax/VAT, tips, and bill splits - all in your browser.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools