CSS Unit Converter (px, em, rem, pt, %)

Front-end work constantly moves between CSS length units, and the conversions trip people up because most of them depend on a base font size rather than being fixed. A design hands you pixels, a stylesheet uses rem for accessibility, a component asks for em, a print rule wants points, and a media query thinks in percent. This converter takes a value in any of these units and instantly shows the equivalent in all of the others, so you can keep your spacing and type scale consistent without doing the arithmetic in your head. Enter a value, set the base font size, choose the unit you are converting from, choose the unit you want, and the result updates straight away alongside a full reference list. The method is simple. Each unit is expressed as how many pixels it represents. A pixel is one pixel, an em and a rem each equal the base font size, a point is 1.3333 pixels because CSS assumes 96 pixels per inch and a point is one seventy-second of an inch, and one percent is a hundredth of the base. The calculator multiplies your value by the pixels-per-unit factor for the from unit to get pixels, then divides by the factor for the to unit. With the common default base of 16 pixels, 16px is 1rem, 12pt is 16px, and 100 percent is the base size. Changing the base font size recomputes everything, which is handy when your root font size is not 16. It suits web developers, designers and anyone tuning a responsive type scale who wants a fast, transparent CSS unit conversion.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner
Pixels to rem
1 rem

Value in every unit

    The formula

    Each unit is defined by how many pixels it represents, using the base font size you enter (call it B). To convert, the calculator multiplies your value by the pixels-per-unit factor for the unit you are converting from to get pixels, then divides by the factor for the unit you want.

    value in px = value × pxPer[from]

    result = value in px / pxPer[to]

    pxPer: px = 1, em = B, rem = B, pt = 1.3333, % = B / 100

    Pixels per unit

    UnitPixels per unit (base B)
    px1
    emB (the base font size)
    remB (the base font size)
    pt1.3333 (96 / 72)
    %B / 100

    Who this calculator is for

    This converter is for web developers and designers who need to move a length between px, em, rem, pt and percent while keeping a consistent type and spacing scale across a stylesheet.

    What this calculator assumes

    • The value and base font size you enter are numeric; anything non-numeric is treated as zero.
    • CSS assumes 96 dpi, so 1pt equals 1.3333px (96 divided by 72).
    • em and rem both use the base font size you enter, so they give the same pixel value here.
    • Percent is treated relative to the base font size, so 100% equals the base.
    • Results are rounded for display.

    Frequently asked questions

    How do I convert px to rem?

    Divide the pixel value by the base font size. At a base of 16, 16px is 1rem and 24px is 1.5rem.

    What is the difference between em and rem?

    A rem is relative to the root font size and an em to the current element. Here both use the base you enter, so they match.

    How many pixels is 1pt?

    1.3333 pixels, because a point is a seventy-second of an inch and CSS assumes 96 pixels per inch. So 12pt is 16px.

    What does percent mean for a CSS length here?

    It is treated as a share of the base font size, so 100% equals the base and 50% is half the base.

    Related calculators

    If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

    Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

    All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

    Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

    Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

    Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

    All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

    About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

    Reviewed and maintained. Last reviewed 2026-06-07 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

    © 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.