Saturday, April 8, 2017

Converting inches to centimeters in your head

While reading a book from the USA about woodworking, I felt the need to find an easy way to roughly convert inches to centimeters quickly in my head. As you probably know 1 inch equals 2.54cm. The problem is that it's not easy, at least for mortals like me, to quickly multiply by 2.54 mentally.


So after a few minutes I came up with this formula:
 cm = in*2 + round_down_to_even(in)/2 + 1
For example, let's suppose that we want to convert 13 inches to centimeters in our head. We apply the formula above and we get:
 13*2 + round_down_to_even(13)/2 + 1 = 26 + 12/2 + 1 = 33cm
While the exact value is 33.02 cm, we got pretty close. I found that this formula works reasonably well for the first 50 inches (127cm) where the error averages to about 0.56cm (see the figure). Unfortunately, the accuracy of this formula decreases proportionally to the number of inches. I link here a LibreOffice spreadsheet that I used to calculate the normal distribution for this formula (see the columns aprox2) and compare the results with other similar formulas that I thought up. If you know of formulas that beat up mine, I'd be glad to know them. Please write a comment.

No comments: