Inch to CM Converter

Inches to centimetres at exactly 2.54, which has been the definition since 1959, with the pixel and point equivalents alongside.

Enable JavaScript to customise; default output below.

Only affects the physical reality section. 96 is the CSS reference, 163 a 27-inch 4K, 227 a 13-inch MacBook Pro, 460 a current phone.

Live preview length.txt
8.5000in = 21.5900cm

8.5000in in every absolute unit
  px                             816.0000
  in                             8.5000  ← in
  cm                             21.5900  ← out
  mm                             215.9000
  pt                             612.0000
  pc                             51.0000

The definitions these come from
  1 inch                         96px, 2.54cm, 25.4mm, 72pt, 6pc
  1mm                            3.779528px
  1cm                            37.795276px
  1pt                            1.333333px, which is why 12pt is 16px

The absolute units in CSS are defined against each other, not measured:
one inch is exactly 96 pixels, 2.54 centimetres, 25.4 millimetres, 72
points and 6 picas. So 8.5000in is 21.5900cm exactly, and no screen is
involved in that conversion.

A CSS pixel is not a device pixel and not a physical length. It is about
1/96 inch on a 96 ppi monitor and about a quarter of that on a phone,
where the browser draws one CSS pixel with several device pixels. That
is the whole reason `1cm` in a stylesheet does not measure a centimetre
on screen.

Physical units belong in a print stylesheet, where the browser knows the
paper size and the conversion means something. In a screen stylesheet
they are a slower way of writing pixels, and they break when a reader
zooms.

The inch has been exactly 2.54 centimetres since the international
agreement of 1959. Rounding it to 2.5 is an error of 1.6 percent, which
is four millimetres across a sheet of A4 and enough to lose a bleed.

12pt is 16px, and that is where the browser default font size comes
from. A point is 1/72 inch in publishing and CSS keeps that definition,
which is why type specified in points from a design tool converts to
pixels cleanly.

`rem` and `em` are the units to reach for in a stylesheet. They scale
with the reader's font size, which is a preference that people set
deliberately and that fixed physical units ignore.

For anything that will be printed, work in millimetres and set the
resolution separately. The pixel dimensions needed follow from the print
size and the resolution, and a file specified in pixels alone has no
physical size at all.

Output is valid and updates as you type.

An inch is exactly 2.54 centimetres. Not approximately: exactly, by international agreement since 1959, when the countries still using the inch agreed to define it in terms of the metre rather than the other way round.

That matters because it makes every conversion here arithmetic rather than measurement, and because rounding it to 2.5 is an error of 1.6 percent. Across a sheet of A4 that is four millimetres, which is enough to lose a bleed or misalign a trim.

The pixel and point figures come along for free, since CSS defines its inch as 96 pixels and publishing defines it as 72 points.

How to use

  1. Put in the value in inches.
  2. Read the centimetre figure, and the millimetre one if you are working to print tolerances.
  3. Use the pixel and point columns if the measurement is heading into a stylesheet or a type spec.

Example

US Letter width, 8.5 inches:

8.5000in = 21.5900cm

8.5000in in every absolute unit
  px                             816.0000
  in                             8.5000  ← in
  cm                             21.5900  ← out
  mm                             215.9000
  pt                             612.0000
  pc                             51.0000

The definitions these come from
  1 inch                         96px, 2.54cm, 25.4mm, 72pt, 6pc
  1pt                            1.333333px, which is why 12pt is 16px

215.9mm exactly. US Letter is 215.9 × 279.4mm, and A4 is 210 × 297, which is why a document laid out for one never quite fits the other.

Pitfalls

2.5 is not 2.54. A 1.6 percent error sounds small and is four millimetres across a page, twelve across a metre. Use the full figure, especially for anything that gets cut or drilled.

Fractional inches need converting first. 8 1/2 is 8.5, 3 3/8 is 3.375. A sixteenth is 0.0625. Mixing a fraction into a decimal field is the most common arithmetic slip in this direction.

US Letter is not A4. 8.5 × 11 inches is 215.9 × 279.4mm; A4 is 210 × 297mm. Letter is wider and shorter, so a PDF built for one and printed on the other either scales or clips, and neither is what the designer intended.

The survey foot still exists. The US survey foot differed from the international foot by two parts per million and was retired for most purposes at the end of 2022. It never mattered for print and it matters for land surveying, where two parts per million across a state is metres.

Inches in CSS are not inches on screen. They are 96 CSS pixels, which is about an inch only on a 96 ppi display. For print CSS they behave correctly; for screen layout use rem and percentages.

Do not round in the middle of a chain. Convert once at the end. Inches to centimetres to pixels with rounding at each step compounds three small errors into a visible one.

Compatibility

Arithmetic in the browser: nothing is uploaded and nothing is stored.

The inch is the international inch, exactly 25.4 millimetres, which is also the figure the CSS specification uses, so the same constants serve the print and the pixel columns. Points are 72 to the inch and picas are 6, both exact.

Every conversion pair is round-tripped in the test suite, and the 12pt-to-16px identity is checked explicitly because it is the one that catches a 72-versus-96 mistake.

The output is shown to four decimal places, which is a ten-thousandth of an inch: finer than any printing process and more than enough for engineering drawing in this direction.

Frequently asked questions

Is an inch exactly 2.54 cm?
Yes. The international yard and pound agreement of 1959 defined the yard as exactly 0.9144 metres, which makes the inch exactly 25.4 millimetres. Before that, different countries used slightly different inches.
How do I convert 5 feet 9 inches?
Multiply the feet by 12 and add the inches: 69 inches, which is 175.26cm. Feet are not in the unit list here because CSS has no foot, and the conversion is a multiplication away.
What about A4 versus Letter?
A4 is 210 × 297mm, Letter is 215.9 × 279.4mm. There is no scale factor that makes one into the other, so a layout that must work on both needs margins generous enough to absorb the difference.
Why does my printed size come out slightly wrong?
Usually “fit to page” or “scale to 95%” in the print dialogue, which many drivers apply by default. Turn scaling off and print at 100 percent before blaming the arithmetic.
How many pixels is an inch for an image?
That depends on the resolution you choose, not on any definition: at 300 ppi an inch is 300 pixels, at 72 it is 72. The 96 figure here is the CSS pixel, which is a different thing entirely.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.