XL
    L
    XS
    M
    S
    XXL

    By , Marketing Specialist, Tailor Size Guide

    Shopify how-toUpdated 9 min read

    How to Add a cm/inch Unit Switch to Shopify Size Charts

    Found this guide useful? Share it with someone who needs it.

    Share
    Add Tailor Size Guide as a preferred source on Google

    A cm/inch switch lets shoppers read your size chart in the units they actually use. On Shopify you can add one in three ways: with a size chart app that has a built-in unit toggle, with a small piece of custom JavaScript in your theme, or by showing both units side by side in a plain table. The app route takes minutes and needs no code. The custom route is free but needs a developer and some maintenance.

    Why bother? Because almost everyone outside the US measures in centimetres, while most US shoppers think in inches. A chart in the wrong unit forces a mental conversion right at the moment someone is deciding on a size, and conversions done in your head are where size mistakes come from. This guide covers the options, the conversion and rounding rules that keep your numbers accurate, and the small design details that make a toggle actually get used.

    Key takeaways

    • 1 inch = exactly 2.54 cm. Convert from your source unit once; never convert back and forth.
    • Round sensibly: 0.5 cm and ¼ or ½ inch match how people measure with a tape.
    • Default the unit by market: inches for the US, cm almost everywhere else.
    • Put the toggle directly above the table, and remember the shopper's choice.
    • Options: an app with a toggle, custom theme code, or both units in one table.

    Who uses which unit

    The US is the main market where shoppers measure their bodies in inches. Canada and the UK are mixed: many people know their measurements in inches, but schools, doctors and most official uses are metric, so younger shoppers often think in centimetres. Most of the rest of the world, including Europe, India, Australia, and most of Asia and Latin America, uses centimetres for body measurements.

    MarketUsual unit for body measurementsSuggested default
    United StatesInchesInches
    CanadaMixedInches, with an easy switch
    United KingdomMixed (inches common in clothing)Inches or cm; show both if you can
    EU, India, Australia, most of AsiaCentimetresCentimetres

    If you sell into more than one of these, a single-unit chart is going to be the wrong unit for a big share of your shoppers.

    The conversion, and why rounding matters

    Since 1959, one inch has been defined as exactly 2.54 centimetres. That number never changes, so the maths is simple:

    • inches × 2.54 = centimetres
    • centimetres ÷ 2.54 = inches

    The trouble isn't the maths. It's the rounding. A chart that says "chest 38.10 cm" looks precise, but nobody measures their chest to a tenth of a millimetre. False precision makes a chart harder to read and suggests an accuracy you don't have. Garment factories typically work to a tolerance of around a quarter to half an inch on most measurements anyway.

    Practical rounding rules that work for size charts:

    UnitRound toWhy
    CentimetresNearest 0.5 cm (or 1 cm for large measurements like hips)Matches tape measure markings people can read easily
    InchesNearest ¼ or ½ inchMatches how US shoppers measure and how US charts are written

    A few examples:

    Inches (source)Exact cmRounded cm
    32 in81.28 cm81 cm
    34½ in87.63 cm87.5 cm
    38 in96.52 cm96.5 cm
    42 in106.68 cm106.5 cm

    The most important rule: one source of truth

    Pick one unit as the master for each chart, the unit your factory or pattern-maker actually uses, and convert from it. Never convert a converted number back again.

    Here's what goes wrong if you do. Start with 34 inches. Convert to cm and round: 86.5 cm. Someone later "fixes" the inch column by converting 86.5 cm back: 34.06 inches, rounded to 34. Fine so far. Do it a few more times with ranges and different rounding, and you get charts where the inch and cm columns disagree by a size. Shoppers notice. They pick the column they trust, and half of them pick the wrong one.

    So: store the source values once, generate the other unit automatically, and round only for display.

    Ranges, not single numbers

    Most size charts show ranges: "Size M, chest 38 to 40 inches." Convert both ends of the range separately, and round each one:

    • 38 to 40 in → 96.5 to 101.5 cm

    Make sure the ranges don't overlap or leave gaps after rounding. If size M ends at 101.5 cm and size L starts at 101.5 cm, a shopper who measures exactly 101.5 cm has two answers. Adjust the boundary so each measurement falls in one size only.

    Option 1: a size chart app with a unit toggle

    This is the quickest route and the one most stores take. With Tailor Size Guide, for example, you enter each chart once in your source unit, switch on the unit toggle, and the app shows a cm/inch switch above the table and converts the values for shoppers. (It's our app, so weigh that, but most good size chart apps work along similar lines.)

    What to look for in any app:

    • Enter once, convert automatically. You shouldn't have to type every chart twice.
    • Sensible rounding you can control.
    • A default unit you can set, ideally by market or language.
    • The toggle remembers the shopper's choice across products.
    • Accessible controls that work with a keyboard and screen reader.

    Setup on most Online Store 2.0 themes is: install the app, create your charts, add the app block next to the variant picker in the theme editor, and switch on the unit toggle in the app's settings. Our guide to adding a size chart to the Dawn theme shows the theme editor steps.

    Option 2: custom code in your theme

    If you'd rather not use an app, a developer can build a toggle into your theme. The usual approach:

    1. Store the source values in the table itself, as data attributes on each cell, so the page always has the original numbers.
    2. Add two buttons above the table, "in" and "cm," marked up as a proper toggle so screen readers announce which unit is active.
    3. When a shopper clicks one, a small script rewrites each cell from its source value using the 2.54 conversion and your rounding rules.
    4. Save the choice in the browser's local storage, so the next product page opens in the same unit.
    5. Set the default from the shopper's market. Shopify's Liquid can tell your theme which country the shopper has selected, so you can start in inches for the US and centimetres elsewhere.

    This is free apart from development time, and it's fully under your control. The downsides are maintenance (theme updates can overwrite your changes, so keep the code in its own snippet and note where it lives) and that every new chart has to be entered in the right format. If you have more than a handful of charts, that adds up.

    Option 3: both units in one table

    The simplest option of all: show inches and centimetres in the same table, either as separate columns or as "38 in / 96.5 cm" in each cell.

    SizeChest (in)Chest (cm)Waist (in)Waist (cm)
    S34 to 3686.5 to 91.528 to 3071 to 76
    M38 to 4096.5 to 101.532 to 3481 to 86.5
    L42 to 44106.5 to 11236 to 3891.5 to 96.5

    It works without any code and it's what most stores start with. The catch is width. A table with three measurements in two units has seven columns, which is too wide for a phone screen and forces sideways scrolling. If your chart has more than two or three measurements, a toggle is easier to read on mobile.

    Designing a toggle people actually use

    A toggle only helps if shoppers notice it and understand it. Small details make a big difference:

    • Put it directly above the table, not in a menu or at the bottom.
    • Label it plainly: "in | cm" or "Inches | Centimetres." Avoid flags; country doesn't equal unit, and flags confuse people in mixed markets like the UK and Canada.
    • Show which one is active clearly, with a filled or highlighted state.
    • Keep the table the same size when switching, so nothing jumps around.
    • Convert everything in the chart, including the how-to-measure notes. "Measure 1 inch below your armpit" should become "2.5 cm" too.
    • Remember the choice on every product page, so shoppers set it once.
    • Make it work with a keyboard, and announce the change to screen readers. Our guide to size chart accessibility covers the details.

    Body measurements vs garment measurements

    Before you convert anything, be sure your chart says which kind of measurement it shows. It's the single most common source of confusion on size charts, in any unit.

    • Body measurements describe the shopper: "chest 38 in" means a person whose chest measures 38 inches should choose this size.
    • Garment measurements describe the item laid flat: "chest 21 in" on a T-shirt usually means the shirt measures 21 inches across from armpit to armpit, which is 42 inches all the way round.

    Both are useful, and many good charts show both. But if the label just says "chest," shoppers will compare their body to a garment number, and the result is wrong in either unit. Label each table clearly ("Body measurements" or "Garment measurements, laid flat"), and if you show flat garment widths, say so, because a flat width has to be doubled to compare with a body measurement. A unit toggle should convert both kinds the same way, but it can't fix a chart that doesn't say what it's measuring.

    Units and international selling

    A unit switch is one part of selling internationally. Shoppers in other countries also need sizes they recognise, such as UK and EU dress sizes or EU shoe sizes. Our guides to localizing size charts by country, translating size charts, and size charts with Shopify Markets cover the rest. The international size converter is useful for checking your conversions.

    Testing before you go live

    Before publishing, check:

    1. Every value converts correctly in both directions. Spot-check five or six cells against a calculator.
    2. No range overlaps or gaps after rounding.
    3. The default unit is right for at least two markets.
    4. The choice persists from one product page to another.
    5. The table fits on a phone screen in both units.
    6. Screen readers announce the unit change.

    Does a unit switch reduce returns?

    On its own, a toggle doesn't make your chart more accurate. What it does is remove a conversion step that shoppers often get wrong or skip. When someone in Germany sees "chest 40" and assumes it's centimetres, or a US shopper guesses at a metric chart, they're likely to order the wrong size. Making the chart readable in their own unit takes away that guess. It works best alongside an accurate chart, clear measuring instructions, and fit notes, which together make the biggest difference to wrong-size returns.

    Frequently asked questions

    How do I add a cm/inch toggle to my Shopify size chart?

    Use a size chart app with a built-in unit toggle, have a developer add a small script to your theme that converts the table, or show both units side by side in one table. The app route needs no code.

    How many cm are in an inch?

    Exactly 2.54 cm. One inch has been defined as 2.54 cm since 1959.

    How should I round converted measurements on a size chart?

    Round centimetres to the nearest 0.5 cm and inches to the nearest quarter or half inch. That matches how people read a tape measure and avoids false precision.

    Which unit should my size chart show first?

    Inches for US shoppers and centimetres for most other markets. If you sell internationally, set the default by the shopper's market and let them switch.

    Is it better to show both units in one table?

    It's simpler and needs no code, but tables with several measurements in two units get too wide for phone screens. If your chart has more than two or three measurements, a toggle is easier to read on mobile.

    Does Dawn have a built-in unit switch?

    No. Dawn's built-in Pop-up and Collapsible row blocks show a page's content as it is. You need custom code or an app to switch units.

    Sources and standards

    1. International yard and pound agreement (1959)Defined the international inch as exactly 2.54 centimetres, the conversion used in this guide.
    2. Shopify Help Center: Online store themesShopify's documentation for adding app blocks and editing themes.
    3. W3C Web Content Accessibility Guidelines (WCAG) 2.2The accessibility guidelines behind the keyboard and screen-reader recommendations for the toggle.
    4. Apparel manufacturing tolerancesGarment specs typically allow a tolerance of around a quarter to half an inch on most measurements, which is why finer precision on a size chart isn't meaningful.

    Put the right size chart on every product

    Tailor Size Guide adds per-product size charts, a cm/inch toggle, and a fit recommender to Shopify product pages, with no theme code.

    Found this guide useful? Share it with someone who needs it.

    Share
    Add Tailor Size Guide as a preferred source on Google