Px to Em Converter
Instantly convert px em with our free converter. See conversion tables, formulas, and step-by-step explanations. Enter your values for instant results.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Px to Em Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Em = Pixels / Base Font Size | Rem = Pixels / 16 | Points = Pixels x 0.75
Worked example โ 24px = 1.5em = 1.5rem = 18pt = 150%
Formula
Em = Pixels / Base Font Size | Rem = Pixels / 16 | Points = Pixels x 0.75
Em is calculated by dividing the pixel value by the parent element font size. Rem always uses the root font size (default 16px). Points equal pixels multiplied by 0.75 (since 1pt = 1/72 inch and 1px = 1/96 inch at standard resolution). Percentage equals (pixels / base) x 100.
Worked Examples
Example 1: Converting Heading Size to Em
Problem:A heading is 24px with a base font size of 16px. What is the em value?
Solution:Em = pixels / base font size Em = 24 / 16 = 1.5 em Rem = 24 / 16 = 1.5 rem Points = 24 x 0.75 = 18 pt Percent = (24 / 16) x 100 = 150%
Result:24px = 1.5em = 1.5rem = 18pt = 150%
Example 2: Converting Em to Pixels
Problem:A margin is set to 2.5em with a parent font size of 14px. What is the pixel value?
Solution:Pixels = em x base font size Pixels = 2.5 x 14 = 35px Rem = 35 / 16 = 2.1875 rem Points = 35 x 0.75 = 26.25 pt
Result:2.5em at 14px base = 35px = 2.1875rem = 26.25pt
Frequently Asked Questions
What is the difference between px, em, and rem in CSS?
Pixels (px) are absolute units that correspond to a fixed number of device pixels on screen. Em is a relative unit based on the font size of the parent element, meaning 1em equals the computed font size of the current element. Rem (root em) is relative to the root HTML element font size, typically 16px by default. Using em and rem makes designs more flexible and accessible because text and spacing scale proportionally when users change their browser font size settings.
Why should I use em or rem instead of pixels?
Using em and rem units improves accessibility and responsive design. When users increase their browser default font size for readability, pixel-based layouts remain fixed while em/rem-based layouts scale proportionally. This is especially important for visually impaired users who rely on larger text. Additionally, rem-based designs are easier to maintain because changing the root font size scales the entire layout proportionally. The WCAG accessibility guidelines recommend using relative units for text sizing.
Why does the same em value look like a different pixel size on different elements of my page?
Em is relative to the font size of the element it is applied to, not to a single fixed page-wide value, so nested elements compound. If a parent div has font-size: 1.5em (24px, assuming a 16px root) and a child span inside it also uses padding: 1em, that padding computes to 24px, not 16px, because it inherits the parent's computed font size rather than the root's. This compounding is the most common source of unexpected spacing bugs when using em for padding or margin inside deeply nested components. Rem avoids this entirely because it always references the root html element's font size regardless of nesting depth, which is why most component libraries default to rem for spacing and reserve em for typography that should intentionally scale with its immediate container.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎTorque Unit Converter
Calculate torque unit converter with inputs, formulas, and instant results.
๐งฎElectrical Resistance Converter (ฮฉ, kฮฉ, Mฮฉ)
Calculate electrical resistance unit converter with inputs, formulas, and instant results.
๐งฎTime Unit Converter
Calculate time unit converter with inputs, formulas, and instant results.
๐งฎArea Converter
Calculate area converter with inputs, formulas, and instant results.
๐งฎAresto Hectares Converter
Calculate aresto hectares converter with inputs, formulas, and instant results.
๐งฎCentimeter to Inch Converter
Calculate centimeter to inch converter with inputs, formulas, and instant results.
๐งฎChain to Meter Converter
Calculate chain to meter converter with inputs, formulas, and instant results.
๐งฎDecimeter to Meter Converter
Calculate decimeterto meter converter with inputs, formulas, and instant results.