Rem to Pixels (rem to px)
Last updated:
Rem-to-pixels conversions translate CSS-absolute-relative rem-unit specifications into absolute pixel values for design-mockup verification, design-system documentation, design-token export, and cross-tool design-handoff work. A 1 rem font-size translates to 16 px under the 16-px-default browser convention; a 1.5 rem heading translates to 24 px; a 0.875 rem small-text translates to 14 px; a 2.5 rem display-heading translates to 40 px. The factor is the multiplicative ratio between the rem (root-html-font-size) and the pixel under the standard 16-px-default browser font-size, with 1 rem = 16 px regardless of DOM nesting depth (unlike em, which cascades). The conversion assumes the standard 16-px-default browser font-size on the html root and is independent of nesting context — rem provides consistent application-wide scaling.
How to convert Rem to Pixels
Formula
px = rem × 16
To convert rem to pixels, multiply the rem figure by 16 — the standard browser-default font-size in pixels under the 16-px-default convention on the html root element. For mental math, "rem × 16" is straightforward integer arithmetic for common rem values: 1 rem = 16 px, 1.5 rem = 24 px, 2 rem = 32 px, 0.5 rem = 8 px, 0.75 rem = 12 px, 0.875 rem = 14 px, 1.125 rem = 18 px, 1.25 rem = 20 px, 2.5 rem = 40 px. The conversion runs at every CSS-rem-source to design-mockup-pixel-destination handoff boundary in modern design-system work, with the factor exact under the standard convention. Unlike em, the rem-to-px conversion is independent of DOM nesting depth — rem always relates to the root html font-size regardless of intermediate font-size overrides.
Worked examples
Example 1 — 1 rem
One rem equals 16 CSS pixels under the standard 16-px-default browser font-size on the html root element. Unlike em, rem is always absolute-relative-to-root-font-size regardless of DOM nesting depth, providing consistent application-wide scaling.
Example 2 — 1.5 rem
One point five rem — a typical web-page heading font-size — converts to 24 CSS pixels on the design-mockup verification value. The rem-figure is the CSS-absolute-relative-to-root source; the px-figure is the absolute design-mockup reference under the standard 16-px-default browser convention.
Example 3 — 2.5 rem
Two point five rem — a typical large-display-heading font-size — converts to 40 CSS pixels on the design-mockup verification value. The rem-based specification is consistent across DOM nesting depth, unlike em which cascades through nested font-size overrides.
rem to px conversion table
| rem | px |
|---|---|
| 1 rem | 16 px |
| 2 rem | 32 px |
| 3 rem | 48 px |
| 4 rem | 64 px |
| 5 rem | 80 px |
| 6 rem | 96 px |
| 7 rem | 112 px |
| 8 rem | 128 px |
| 9 rem | 144 px |
| 10 rem | 160 px |
| 15 rem | 240 px |
| 20 rem | 320 px |
| 25 rem | 400 px |
| 30 rem | 480 px |
| 40 rem | 640 px |
| 50 rem | 800 px |
| 75 rem | 1200 px |
| 100 rem | 1600 px |
| 150 rem | 2400 px |
| 200 rem | 3200 px |
| 250 rem | 4000 px |
| 500 rem | 8000 px |
| 750 rem | 12000 px |
| 1000 rem | 16000 px |
| 2500 rem | 40000 px |
| 5000 rem | 80000 px |
Common rem to px conversions
- 0.25 rem=4 px
- 0.5 rem=8 px
- 0.75 rem=12 px
- 0.875 rem=14 px
- 1 rem=16 px
- 1.25 rem=20 px
- 1.5 rem=24 px
- 2 rem=32 px
- 2.5 rem=40 px
- 4 rem=64 px
What is a Rem?
In modern CSS the rem (rem) is an absolute-relative typography unit equal to the computed font-size of the root html element. Under the standard 16-px-default browser font-size, 1 rem = 16 px universally across the document, regardless of nesting depth or local font-size overrides. The unit avoids the cascading-multiplication behaviour of em — a "1 rem" value in a deeply-nested element always equals the same physical size as a "1 rem" value at the root element. Under typical 16-px-default browser conventions, 1 rem ≈ 16 px and 1 px = 0.0625 rem. The relationship is element-tree-independent (unlike em, which is cascading-element-relative). The "62.5% root-font-size trick" sets html { font-size: 62.5% } making the root 10 px and 1 rem = 10 px for simpler integer-fraction calculations (1.6 rem = 16 px, 2.4 rem = 24 px), though this trick is increasingly avoided in modern accessibility-aware design work because it can disrupt user accessibility-zoom settings. The 16-px-default convention is the universal modern web reference, with every major browser (Chrome, Firefox, Safari, Edge) defaulting to 16 px html font-size unless overridden.
The rem (root em) unit was formalised in CSS3 (around 2010) as an absolute-relative typography unit defined relative to the root html element's font-size, complementing the cascading-relative em unit from CSS1 (1996). The motivation was practical: em-units cascade through the DOM tree, multiplying scaling factors at each level of nested font-size override, which can produce unexpectedly-large or unexpectedly-small computed values in deeply-nested layouts. The rem unit avoids this by always being relative to the root html font-size regardless of nesting depth, providing consistent application-wide scaling. The introduction of rem coincided with the rise of responsive-web-design (Ethan Marcotte's 2010 article) and accessibility-aware typography practice, where designers wanted both adaptive scaling (responding to user-controlled root font-size) and predictable behaviour (no cascading multiplication). Modern CSS frameworks and design-systems (Tailwind CSS, Material-UI, Bootstrap 5+, Material Design) use rem extensively for application-wide spacing-and-typography scales, with rem-based scales like Tailwind's text-sm (0.875 rem ≈ 14 px), text-base (1 rem ≈ 16 px), text-lg (1.125 rem ≈ 18 px) becoming the universal pattern. The rem-based approach also supports the "62.5% root-font-size trick" where html { font-size: 62.5% } sets the root to 10 px, making 1 rem = 10 px for clean integer-fraction calculations.
Modern responsive-and-accessibility-aware web-typography globally — CSS frameworks (Tailwind CSS, Bootstrap 5+, Material-UI, Material Design, Carbon Design System, Chakra UI) use rem extensively for application-wide spacing-and-typography scales. Tailwind's default spacing-scale uses rem-based values (space-1 = 0.25 rem = 4 px, space-4 = 1 rem = 16 px, space-16 = 4 rem = 64 px), with the rem-based approach supporting accessibility-zoom adaptation and consistent visual rhythm across the application. Typography-component design uses rem for application-wide font-size scales (text-sm, text-base, text-lg, text-xl, text-2xl, etc.), giving predictable scaling regardless of component-nesting context. Layout-grid systems use rem for breakpoint-and-container-width specifications when accessibility-zoom adaptation is desired. Modern design-tokens (the JSON-or-YAML configuration of design-system primitive values used in Style Dictionary, Theo, Tokens Studio, etc.) commonly use rem-based values for cross-platform-consistent scaling. The rem unit is web-and-CSS-specific — it is not used in print-typography (where points are the canonical unit), email-templates (where px-and-pt are more universally compatible), or print-design software. Modern accessibility-best-practice recommends rem for typography-and-spacing to support user-controlled root font-size scaling.
What is a Pixel?
In modern web typography under CSS specifications, the pixel (px) is the CSS reference pixel — a logical unit nominally equal to 1/96 inch (about 0.2646 mm) at the CSS reference viewing distance. The unit scales by device-pixel-ratio for high-DPI displays: a "Retina" display with 2x device-pixel-ratio renders one CSS pixel as a 2×2 grid of physical hardware pixels, preserving the visual size while doubling the rendering resolution. The CSS pixel relationship to other typography units is fixed under the 96-dpi convention: 1 inch = 96 px, 1 cm = 37.795 px, 1 mm = 3.7795 px, 1 pt = 4/3 px ≈ 1.3333 px, 1 pc = 16 px (with the pica equal to 12 points). The 96-dpi convention is the universal reference across modern web browsers (Chrome, Firefox, Safari, Edge), CSS specifications, and screen-typography work. Print-typography traditionally uses points (1 pt = 1/72 inch), and the 96-dpi-versus-72-dpi distinction explains the 4/3 factor between web pixels and print points. Modern operating systems may override the 96-dpi default through display-scaling settings, but CSS reference pixel calculations remain anchored to the 96-dpi reference.
The pixel (a portmanteau of "picture element") emerged in 1960s digital-image-processing research at JPL, Bell Labs, and similar laboratories as the discrete addressable unit of a raster-scanned digital image. The term was coined by JPL researcher Frederic C. Billingsley in 1965 in connection with the Mariner mission imaging-systems work. As digital displays evolved through the 1970s and 1980s — from monochrome CRT terminals through colour CRTs and into early LCD displays — the pixel became the fundamental unit of screen-based typography and graphics. The CSS Working Group standardised the CSS reference pixel in 1996 as part of CSS1, with the original definition tied to a 96-dpi reference viewing-distance of an arm's length from a desktop monitor. The 2010 CSS3 spec formalised the reference-pixel abstraction: 1 CSS pixel ≈ 1/96 inch at the reference viewing distance, scaled by device-pixel-ratio for high-DPI ("Retina") displays. Modern web typography overwhelmingly uses pixels (px) as the base unit for font-sizes, line-heights, padding, margins, and component dimensions, with em-and-rem relative units providing scale-relative-to-parent and scale-relative-to-root respectively. The 96-dpi reference convention also drives the conversion between pixels and traditional print-typography points (1 pt = 4/3 px at 96 dpi).
Web typography globally — CSS font-size, line-height, padding, margin, border-radius, border-width, and component-dimension specifications all use pixels as the base unit on every modern web browser. CSS frameworks (Tailwind CSS, Bootstrap, Material-UI, Ant Design) all use px as the primary spacing-and-typography unit, with em-and-rem relative units providing scale-relative-to-parent and scale-relative-to-root flexibility. Mobile-app typography on iOS uses points (which on iOS are implementation-detail-equivalent to CSS pixels at the reference scale, scaled by device-pixel-ratio), Android uses density-independent-pixels (dp/dip) which are similarly reference-scaled. Digital-image-processing and computer-graphics: image dimensions, sprite-sheet layouts, texture-coordinate-mapping all use pixels. Screen-typography: every modern operating-system font-rendering pipeline computes glyph dimensions in pixel-equivalent units. Game-development and game-engine frameworks (Unity, Unreal, Godot) use pixels as the canonical 2D-coordinate unit. Email-template typography uses pixels heavily for cross-client compatibility (Outlook, Gmail, Apple Mail all render pixel-based dimensions consistently). Print-design software (Adobe InDesign, Affinity Publisher) supports both pixel-and-point input with automatic 96-versus-72-dpi conversion at the print-output boundary.
Real-world uses for Rem to Pixels
Tailwind CSS rem spacing-scale translated to pixel design-mockup verification values
Tailwind CSS uses rem-based spacing-scales (space-1: 0.25rem, space-2: 0.5rem, space-4: 1rem, space-8: 2rem, space-16: 4rem) and typography-scales (text-sm: 0.875rem, text-base: 1rem, text-lg: 1.125rem, text-xl: 1.25rem) extensively, with conversion to pixel values for design-mockup verification and design-system documentation. A 0.25 rem space-1 translates to 4 px; a 1 rem space-4 translates to 16 px; a 4 rem space-16 translates to 64 px. The conversion runs at every Tailwind-rem-source to design-mockup-pixel-verification step.
CSS rem typography-scale translated to pixel design-tokens for cross-tool import
Modern design-system typography-scales expressed in rem (h1: 2.5rem, h2: 2rem, h3: 1.5rem, body: 1rem, small: 0.875rem) translate to pixel-based design-tokens for cross-tool import into Figma, Sketch, Adobe XD, and similar design tools. A 2.5 rem h1 translates to 40 px; a 2 rem h2 translates to 32 px; a 1.5 rem h3 translates to 24 px; a 0.875 rem small translates to 14 px. The conversion runs at every CSS-rem-design-system-source to design-tool-pixel-token-import step in modern design-token-pipeline work.
Material-UI and Material Design rem theme values translated to pixel verification
Material-UI and Material Design system rem-based theme values (spacing-unit: 8px = 0.5rem, typography-scales in rem) translate to pixel values for design-mockup verification and developer-handoff documentation. A 0.5 rem spacing-unit translates to 8 px; a 1 rem base-spacing translates to 16 px; a 2.125 rem h1 translates to 34 px; a 1.5 rem h2 translates to 24 px. The conversion runs at every Material-rem-theme to pixel-verification documentation step in Material-Design-based design-system work.
Bootstrap rem typography-and-spacing translated to pixel values for design-mockup verification
Bootstrap 5+ uses rem-based typography-and-spacing scales (font-size base: 1rem = 16px, h1: 2.5rem = 40px, h2: 2rem = 32px, etc.), with conversion to pixel values for design-mockup verification and component-library-customisation documentation. A 1 rem base-font translates to 16 px; a 2.5 rem h1 translates to 40 px; a 0.875 rem small translates to 14 px; a 1.25 rem h5 translates to 20 px. The conversion runs at every Bootstrap-rem-source to pixel-mockup-verification step.
When to use Pixels instead of Rem
Use pixels whenever the destination is design-mockup verification, design-handoff to development teams, design-tool-import (Figma, Sketch, Adobe XD), design-token export pipelines (Style Dictionary, Theo, Tokens Studio), or any context requiring absolute pixel-based values rather than CSS-relative units. The pixel is the universal absolute design-mockup-and-design-tool unit across modern design-handoff workflows. Stay in rem when the destination is CSS specifications for application-wide consistent scaling, design-system documentation for typography-and-spacing scales, accessibility-zoom-adaptive design, or any context where absolute-relative-to-root-font-size scaling is desired. The conversion is the CSS-rem-to-absolute-pixel scale-shift between rem-based CSS source and pixel-based design-tool destination work, applied at every design-handoff and design-token-export boundary in modern design-system practice across Tailwind-and-Material-and-Bootstrap-and-Carbon framework conventions.
Common mistakes converting rem to px
- Assuming "1 rem = 16 px" universally without verifying the 16-px-default browser font-size assumption. The relationship holds only when the html root font-size is 16 px (the universal modern browser default). User accessibility settings (browser-zoom, larger-text features), page-specific CSS reset rules, or the "62.5% root-font-size trick" can shift the effective root font-size and the rem-to-px conversion accordingly.
- Confusing rem (absolute-relative-to-root-font-size) with em (cascading-relative-to-current-font-size). A rem value always equals the same physical size regardless of DOM nesting depth, while em cascades and multiplies through nested font-size overrides. Use rem for application-wide consistent scaling and em for component-internal proportional scaling.
Frequently asked questions
How many pixels in 1 rem?
One rem equals 16 CSS pixels under the standard 16-px-default browser font-size on the html root element. Unlike em, rem is always absolute-relative-to-root-font-size regardless of DOM nesting depth, providing consistent application-wide scaling. The 16-px-default convention is universal across modern browsers (Chrome, Firefox, Safari, Edge), but can be overridden by user accessibility settings or page-specific CSS reset rules.
How many pixels in 1.5 rem (web heading)?
One point five rem equals 24 CSS pixels under the standard 16-px-default browser convention. That is a typical web-page heading font-size translated to design-mockup pixel reference, with the rem-figure on the CSS-absolute-relative-to-root source and the px-figure on the absolute design-mockup reference. The 1.5 rem to 24 px conversion is the canonical web-heading reference in modern design-system documentation.
How many pixels in 2.5 rem (large heading)?
Two point five rem equals 40 CSS pixels under the standard 16-px-default browser convention. That is a typical large-display-heading or h1 font-size translated to design-mockup pixel reference. The rem-based specification is consistent across DOM nesting depth, supporting application-wide consistent scaling for large display typography.
Quick way to convert rem to pixels in my head?
Multiply the rem figure by 16 — straightforward integer arithmetic for common values. For 1 rem that gives 16 px, for 1.5 rem that gives 24 px, for 2 rem that gives 32 px, for 0.5 rem that gives 8 px, for 0.875 rem that gives 14 px, for 2.5 rem that gives 40 px. The relationship is exact under the standard 16-px-default browser convention, with the simple "× 16" rule giving exact figures for everyday CSS-rem-to-pixel conversion.
What is the difference between rem and em?
Rem is absolute-relative-to-root-font-size — 1 rem always equals the root html font-size regardless of DOM nesting depth, providing consistent application-wide scaling. Em is cascading-relative-to-current-font-size — 1 em equals the computed font-size of the current element, with nested font-size overrides multiplying scale at each level. For most modern design-system work, use rem for application-wide consistent scaling.
When does rem-to-px conversion appear in real work?
It appears in Tailwind CSS rem spacing-scale translated to pixel design-mockup verification values and in CSS rem typography-scale translated to pixel design-tokens for cross-tool import. It also appears in Material-UI and Material Design rem theme values translated to pixel verification and in Bootstrap rem typography-and-spacing translated to pixel values for design-mockup verification. The conversion is one of the most-run CSS-relative-to-absolute typography conversions in modern design-system work, with rem-based scales dominating contemporary CSS framework conventions.
How precise should rem-to-px be for design work?
For design work the rem-to-px conversion is exact under the standard 16-px-default browser convention (1 rem = 16 px), with the precision allowance coming from rounding to integer pixel values for crisp screen rendering. Most design-system documentation rounds to integer pixels (1 rem → 16 px, 0.875 rem → 14 px) rather than fractional values to avoid sub-pixel rendering inconsistencies. Higher-precision applications preserve fractional pixel values, especially in vector-graphics and SVG output.