help cm2in 


cm2in Conversion between inch/cm (and others)

Syntax cm2in [ #[unit] | keyword ] [, unit(unit)]

In the syntax diagram, # is a number, unit is unit of length, and keyword is a keyword for a standard paper format.


cm2in converts length or lists of length given in one metric unit into various other metric units. The program is focused on converting centimeters to inches but it also provides conversion from/to the following other units:

Unit Explanation --------------------------------------------------------------- cm centimeter m meter in international inch ft international feet yd international yard ch chain mi statute mile pt desktop publishing point (PostScript point) pica computer pica ---------------------------------------------------------------

cm2in allows as input numbers or keywords for some standard paper format. If a number is specified the number is converted to all the metric units mentioned above. If no unit is given, cm is implied. The metric unit of the number can be specified with the number, or with option unit(), or both.

cm2in allows as input the specification of keywords for some standard paper formats. If a keyword is specified, the program shows the height and width of the specified paper format in the various metric units. The paper format is requested by any of the following keywords:

Keyword Explanation ---------------------------------------------------- American paper formats letter Letter format legal Legal format executive Executive format tabloid Tabloid format (Synonym: ledger) broadsheet Broadsheet format

German paper formats (aka ISO 216) A0, A1, ..., A10 German DIN A formats B0, B1, ..., B10 German DIN B formats C0, C1, ..., C10 German DIN C formats D0, D1, ..., D10 German DIN D formats

Special formats Graph Size of active graph scheme ----------------------------------------------------

The keyword specification of cm2in can be useful for controlling the size of a graph using the options xsize() and ysize(). Here, for example we use the command to get a figure in A4 format:

. sysuse auto . cm2in A4 . graph dot mpg, over(make) ysize(`r(in1)') xsize(`r(in2)')

Specifying the command without a paper format or a number defaults to converting 1cm into the other metric units.


unit(unit) is used to specify the metric unit of the numbers provided. As unit, any of cm, m, in, ft, yd, ch, mi, pt, and pica are allowed. Note that the metric unit can be also appended directly to the numbers. However, if more than one number is specified, option unit() might be easier to use. Note also that any metric unit specified for one specific number overwrites the unit-option for that number.


The German system of paper sizes was introduced 1922 as a DIN standard by Johann Beckmann, who followed earlier ideas of the German scientist Georg Christoph Lichtenberg (1798). It has been adopted as the standard paper format by the International Standardization Organization in 1982 (IS0 128) and is today used in most countries of the world - the U.S., Canada and Mexico being notable exceptions.

The advantage of the German system is that the paper has an aspect ratio of sqrt(2). Dividing a paper with an aspect ratio of sqrt(2) into two equal halves parallel to its shortest sides always retains the aspect ratio of sqrt(2). This has some highly desirable consequences for modern offices: Folded brochures of any size can be made by using sheets of the next larger size, e.g. A4 sheets are folded to make A5 brochures. The system allows scaling without compromising the aspect ratio from one size to another - as provided by office photocopiers, e.g. enlarging A4 to A3 or reducing A3 to A4. Similarly, two sheets of A4 can be scaled down and fit exactly 1 sheet without any cutoff or margins (Wikipedia).


. cm2in . cm2in 4 . cm2in 4cm 7pica 8in . cm2in 1 4 9 12 100, u(pt) . cm2in letter . cm2in A6

. sysuse auto . scatter price mpg . cm2in Graph


Ulrich Kohler


I am grateful to Kit Baum for reporting a bug and making helpful suggestions.

Also see

Online: help for msq2ftsq, g2oz (if installed)