Skip to main content
KalkuNet

CSS Unit Converter — px, rem, em, pt, cm, vw and More

Convert CSS pixels to rem/em and viewport percentages with custom root font size.

Runs in your browserWeb · Email, DNS & Web Media
Valuepxrememptcmmminvwvh%
16px1611120.42334.23330.16671.11111.7778100
1.5rem241.51.5180.6356.350.251.66672.6667150
12pt1611120.42334.23330.16671.11111.7778100
2.54cm9666722.5425.416.666710.6667600
50vw720454554019.05190.57.550804500
125%201.251.25150.52925.29170.20831.38892.2222125

When to use the CSS px, rem, em, vw, vh Unit Converter

  • Exact values per the CSS standard

    Absolute units use the CSS Values ratios: 1 inch equals 96 px, 2.54 cm, 72 pt and 6 pc, so results match what browsers compute.

  • Relative units for your context

    Set the root font size for rem, the parent font for em, the viewport size for vw and vh, and the 100% reference so conversions match your design.

  • Many values in one table

    Paste a list of sizes from a design file and see them all in px, rem, em, pt, cm, mm, inches, vw, vh and percent at once.

  • Checked with the browser's CSS engine

    Every formula is compared with the size Chrome actually computes for an element styled in the same unit, rem and vw included.

Frequently asked questions

Why use rem for font sizes?

rem follows the font size users choose in browser settings, so text grows for people with low vision, while px does not.

What is the difference between rem and em?

rem is based on the html element's font, the same across the page. em is based on the parent's font, so it compounds when nested.

When should I use vw and vh?

For sizes that follow the screen, such as a full-height hero. On phones consider dvh, because the browser's address bar changes the viewport height.

Which units suit print?

For print stylesheets, pt, cm and mm fit best because printers really use those physical sizes.

Learn more