Pixel to REM Calculator

Convert web layouts from absolute Pixels (PX) to relative REM values based on root font sizes.

Calculator

Pixels (PX)
Relative REM
Root Base Font Size (px)

Standard browser default is 16px.

PX vs. REM: Responsive Typography in Modern Web Design

Creating responsive layouts requires choosing correct measurement units in CSS. Traditionally, designers defined everything in Pixels (PX). However, static pixel dimensions do not scale automatically, which compromises readability and user experience on mobile screens or for visually impaired users.

What is a REM Unit?

REM stands for "Root Em". It is a relative unit that scales relative to the font-size of the root HTML element (the <html> tag). If the base root font size is set to 16px, then 1rem is equal to 16px, 2rem equals 32px, and 0.75rem equals 12px.

Accessibility Tip: Visually impaired users often increase their default browser text size. If your site uses REM units, your text and layouts will scale up naturally with their preferences. If you use static PX, the text will remain small and hard to read.

Formula for Conversion

  • PX to REM Formula: REM = Pixels / Base Font Size. (e.g. 24px / 16px = 1.5rem).
  • REM to PX Formula: Pixels = REM * Base Font Size. (e.g. 2rem * 16px = 32px).