Cookies for analytics and advertising
We use cookies for analytics and advertising, both sent to Google. Refusing changes nothing you can see.Read the privacy page
1 km = 39370.0787402 in
A kilometre is 39,370.0787 inches, and unlike most conversions here the decimal never stops — the exact value is 39,370 and ten 127ths of an inch. Converting kilometres to inches is something software asks for rather than people, and the useful part is knowing how much of the answer to write down.
50.45 km is 1986000 in
— the Channel Tunnel.
384400 km is 15130000000 in
— the average distance to the Moon.
0.001778 km is 70 in
— a height of five foot ten.
0.0003962 km is 15.6 in
— a common laptop screen, measured corner to corner.
| km | in |
|---|---|
| 1 | 39370.0787402 |
| 2 | 78740.1574803 |
| 3 | 118110.23622 |
| 5 | 196850.393701 |
| 10 | 393700.787402 |
| 20 | 787401.574803 |
| 50 | 1968503.93701 |
| 100 | 3937007.87402 |
Convert km to in
Kilometres are the road distance nearly everywhere outside the United States and the United Kingdom, which is why converting them is usually about reading a map or a race entry.
An inch has been exactly 25.4 mm since 1959, when six countries agreed to stop using slightly different ones. Before that a US inch and a UK inch differed in the seventh significant figure: 25.400 05 mm against 25.400 00.
The factor is 39370.07874, and almost nobody carries that around. Rounded to 39000 it is off by 0.94 % — which stays invisible on small numbers and turns into a whole unit somewhere around 1,000 km.
That is the number worth knowing before you round: not the error itself, but where it stops being ignorable. Below that point the shorter factor is the sensible one; above it, use the field above, which never rounds until it prints.
The inch has been defined in metric terms since the international yard and pound agreement of 1959, and in this page's units that comes out at 0.0000254 km to one. The definition is exact by stipulation — it was not measured, and it cannot be refined by measuring it better. The decimal above is the whole of it, with nothing rounded away at the end.
Before that agreement the US and the British versions differed slightly, and old survey figures still carry the older definition. For anything outside land surveying the difference is far below the precision anybody is working to.
The exact value has a fraction in it. A kilometre is a million millimetres, an inch is exactly 25.4 mm, so a kilometre is 1,000,000 ÷ 25.4 inches — which is 5,000,000 ÷ 127, or 39,370 and 10/127 of an inch. That fraction is the honest way to write the answer, and 39,370.0787401575 is a truncation of it.
The 127 is where the untidiness comes from. Dividing by 25.4 is the same as multiplying by 5/127, and 127 is prime, so it divides no power of ten and the decimal expansion repeats forever. Every conversion from metric into inches inherits that property, and every conversion from inches into metric avoids it, which is a one-line summary of why the 1959 agreement defined the inch in millimetres rather than the other way round.
The factor is exact and the decimal is not, and those two statements are compatible. The relationship between the inch and the metre is fixed by definition to the last digit; what does not terminate is its decimal representation in this direction. A converter showing 39,370.079 has rounded, one showing 39,370.08 has rounded harder, and neither has disagreed with the other about the underlying ratio.
It matters when a value is converted back. Take a kilometre to inches at four decimal places, convert the result to millimetres, and you land 0.0025 mm away from where you started — harmless. Round the inch figure to a whole number first and the round trip lands two millimetres away. Where a value will make the journey more than once, store it in the metric unit and convert only for display.
Nobody describes a distance this way, so the readers are systems and the people feeding them. A CAD assembly whose document unit is inches has to hold a metric site dimension. A CNC control set to imperial mode receives a program generated from a metric model. A database with one length column, defined in inches by whoever built it, has to store a figure that arrived in kilometres. A scaling calculation converts a map distance into a model one and the model is built in inches.
All four are the same shape of problem: the unit is a property of the container rather than of the measurement. The right habit is to keep the original figure and its unit alongside the converted one, so the conversion can be checked and, when the container is eventually fixed, undone. A converted number with no record of where it came from is the thing that cannot be audited later.
The commonest way this conversion goes wrong is that it happens silently. Many exchange formats carry numbers without units, so a model drawn in millimetres and opened in an inch document is interpreted as inch values and comes in 25.4 times too large; opened in a metre document those same numbers become metres and it is a thousand times too large. Nothing errors, because every number in the file is valid in either interpretation.
The check that catches it costs seconds: measure one known feature after import. A part you know is 100 mm across should read 100 mm, or 3.937 inches, and anything else is a unit mismatch rather than a modelling error. Fixing it by setting the document unit and re-importing is safer than scaling the geometry, because a scale factor of 25.4 applied to a model rounds every coordinate in it.
One inch is 25 parts per million of a kilometre. A distance known to the nearest metre — which is better than most road, route and map distances are known — supports an inch figure to about forty inches, and that is the point at which further digits stop describing anything. A GPS track good to a few metres supports the inch figure to a hundred inches or worse.
So the decimals in 39,370.0787 are almost always decoration. Write the digits that the input justified and no more: a route measured to a tenth of a kilometre becomes about 3,937 inches of resolution, which means the answer should be rounded to thousands of inches. This is the one page in this family where the rounding advice is to cut hard rather than to keep everything.
If a person is going to read the answer, the inch is the wrong target for a distance of this size. A kilometre is 0.621 miles, 1,093.6 yards or 3,280.84 feet, and any of those gives a reader something to picture. Thirty-nine thousand inches gives them a number to squint at. Where you control the output unit, choose the one that matches the size of the thing being measured.
The inch earns its place only when something downstream requires it. That is a real requirement and worth serving properly — convert exactly, round once, keep the original — but it is a requirement of the software rather than a fact about the distance. Where the field is yours to define, defining it in metres and converting for display removes the problem instead of managing it.
There are three ways to get from a kilometre to inches and they do not all end in the same place. Dividing by 25.4 after converting to millimetres is the direct route and gives 39,370.0787. Going through miles gives the same answer if the mile figure is carried in full, and something else if it is not: a kilometre rounded to 0.6214 miles and multiplied by 63,360 comes out at 39,371.9 inches, nearly two inches adrift.
The third route, through feet, has the same weakness — 3,280.84 feet times twelve is 39,370.08 only because the feet figure kept five decimals. The lesson generalises past this pair: chain conversions multiply the rounding of every step, so convert once from the original unit rather than following whatever path the units happen to suggest. Where a chain is unavoidable, carry every intermediate at full precision and round only the final figure.
39,370.0787401575, and the digits carry on repeating. The exact value is 5,000,000 divided by 127, which is 39,370 and ten 127ths of an inch. It cannot be written as a terminating decimal because 127 is prime and divides no power of ten.
Because the definition points the other way. An inch is exactly 25.4 mm, so anything measured in inches converts to metric with a terminating decimal. Going from metric to inches means dividing by 25.4, and dividing by a number ending in 4 does not generally terminate — 1 metre is 39.37007874… inches, repeating.
One inch in a kilometre is 25 parts per million. A distance known to the nearest metre supports the inch figure to about forty inches, so writing 39,370.079 for a road distance claims a thousandth of an inch over a kilometre — roughly the width of a human hair over the length of ten football pitches.
Because the file carried numbers without units and the receiving document assumed its own. A model drawn in metres opened in a document set to millimetres is a thousand times too small, and one drawn in millimetres opened in an inch document is 25.4 times too large. Set the document units before importing rather than scaling afterwards, because a scaled model carries the rounding of the scale factor into every dimension.
In standard G-code, G20 selects inches and G21 selects millimetres, and the mode is modal — it stays set until something changes it. A program that omits the line runs in whatever the control was left in, which is the mechanism behind most of the crashes attributed to unit conversion. State the unit at the top of every program rather than relying on the previous job.
For a distance of this size, usually not. A kilometre is 0.621 miles or 3,280.84 feet, and both of those are numbers an imperial reader can place. The inch is the right target only when a system demands it, and in that case the figure is a value to be stored rather than a description to be read.
One in is 0.0000254 km. It is the same relationship read backwards, so an answer from one page put through the other has to come back to where it started.
The claims this page makes about length units are checkable, and these are the documents that settle them.
The factor is a constant in the page and the arithmetic is four operations, so nothing is sent anywhere and nothing needs to be. The number you type never leaves the browser — there is no request for it to travel in.