I am now on Twitter! Meet me on Twitter here (my nick is pkrumins.)
Or on Google Buzz and Facebook.

I learned an interesting fact about Fibonacci numbers recently while watching a lecture on number theory. Fibonacci numbers can be used to approximately convert from miles to kilometers and back.
Here is how.
Take two consecutive Fibonacci numbers, for example 5 and 8. And you’re done converting. No kidding – there are 8 kilometers in 5 miles. To convert back just read the result from the other end - there are 5 miles in 8 km!
Another example. Let’s take the consecutive Fibonacci numbers 21 and 34. What this tells us is that there are approximately 34 km in 21 miles and vice versa. (The exact answer is 33.79 km.)
If you need to convert a number that is not a Fibonacci number, just express the original number as a sum of Fibonacci numbers and do the conversion for each Fibonacci number separately.
For example, how many kilometers are there in 100 miles? Number 100 can be expressed as a sum of Fibonacci numbers 89 + 8 + 3. Now, the Fibonacci number following 89 is 144, the Fibonacci number following 8 is 13 and the Fibonacci number following 3 is 5. Therefore the answer is 144 + 13 + 5 = 162 kilometers in 100 miles. This is less than 1% off from the precise answer, which is 160.93 km.
Another example, how many miles are there in 400 km? Well, 400 is 377 + 21 + 2. Since we are going the opposite way now from miles to km, we need the preceding Fibonacci numbers. They are 233, 13 and 1. Therefore there are 233 + 13 + 1 = 247 miles in 400 km. (The correct answer is 248.55 miles.)
Just remember that if you need to convert from km to miles, you need to find the preceding Fibonacci number. But if you need to convert from miles to km, you need the subsequent Fibonacci number.
If the distance you’re converting can be expressed as a single Fibonacci number, then for numbers greater than 21 the error is always around 0.5%. However, if the distance needs to be composed as a sum of n Fibonacci numbers, then the error will be around sqrt(n)·0.5%.
Here’s why it works.
Fibonacci numbers have a property that the ratio of two consecutive numbers tends to the Golden ratio as numbers get bigger and bigger. The Golden ratio is a number and it happens to be approximately 1.618.
Coincidentally, there are 1.609 kilometers in a mile, which is within 0.5% of the Golden ratio.
Now that we know these two key facts, we can figure out how to do the conversion. If we take two consecutive Fibonacci numbers, Fn+1 and Fn, we know that their ratio Fn+1/Fn is 1.618. Since the ratio is approximately the same as kilometers per mile, we can write Fn+1/Fn = [mile]/[km]. It follows that Fn·[mile] = Fn+1·[km], which translates to English as “n-th Fibonacci number in miles is the same as (n+1)-th Fibonacci number in kilometers”.
That’s all there is to it. A pure coincidence that the Golden ratio is almost the same as kilometers in a mile.
Did you like this post? Subscribe here:
If you really enjoyed the post, I'd appreciate a gift from my geeky Amazon book wishlist. Books would make me more educated and I could write even better posts. Thanks! :)

(43 votes, average: 4.4 out of 5)
|
|
|


January 13th, 2010 at 2:55 pm
Great…now if you could only tell us an EASY way to express the original number as a sum of Fibonacci numbers… :)
January 13th, 2010 at 2:59 pm
[…] full post on Hacker News If you enjoyed this article, please consider sharing it! Tagged with: convert […]
January 13th, 2010 at 3:17 pm
That’s pretty cool!
Of course, the other way of doing this - especially for those of us who can’t recite the Fibonacci sequence on demand - is to type “58 miles in km” into any Google and get the answer back ;)
January 13th, 2010 at 3:18 pm
Just to make it clear - you’re talking about “normal” mile, not a nautical one.
Unfortunately neither nautical distances nor speed (knots) cannot be converted with this nice hack:-(
January 13th, 2010 at 3:44 pm
I can mentally multiply/divide by 1.6 an order of magnitude faster than I can work out how to express a number in Fibonacci numbers…
January 13th, 2010 at 4:09 pm
nice hack………..
January 13th, 2010 at 4:09 pm
[…] info | CatonMat Etiquetas: Fibonacci, matematicas […]
January 13th, 2010 at 5:05 pm
Very nice observation. I wonder whether the connection to the golden ratio really is incidental.
January 13th, 2010 at 5:15 pm
klabr,
I think it must be a coincidence. The length of a meter was originally based on the circumference of the Earth, while the length of a mile was based on the Roman pace. As coincidences go, this is a pretty strange and interesting one.
January 13th, 2010 at 5:19 pm
that is less convenient ánd less accurate than multiplying by 1.6!
January 13th, 2010 at 5:35 pm
@ Bill the Lizard:
Thank you Bill. Didn’t know about ‘Roman miles’.
By the way: Six visual proofs - well done!
January 13th, 2010 at 5:37 pm
Very cute hack. It made me smile.
January 13th, 2010 at 5:45 pm
You could also convert from feet to yards by multiplying it by the speed of light and dividing by a 100 million!
That’s all there is to it. The speed of light, a ratio which occurs so often in physics equations, can also be used inaccurately to convert between feet and yards.
January 13th, 2010 at 6:21 pm
It would be nice if you put some latex support on your blog.
January 13th, 2010 at 7:35 pm
Nice observation.
January 13th, 2010 at 8:14 pm
Nifty, if not all that useful - as others have said, it’s a lot easier to remember, and calculate, the 1.6 multiplier.
January 14th, 2010 at 4:17 am
Or check your spedometer. Handy conversion chart, and you don’t even have to multiply.
January 14th, 2010 at 5:18 am
[…] Source : http://www.catonmat.net/blog/using-fibonacci-numbers-to-convert-from-miles-to-kilometers/ […]
January 14th, 2010 at 7:55 am
good to know, thnx for sharing
January 14th, 2010 at 8:01 am
Please consider using the International Standard for expressing distances. Helps avoid space craft crashes I’ve heard. ;)
January 14th, 2010 at 8:14 am
So 1 mile is 1 km?
January 14th, 2010 at 11:43 am
Yes, 1 mile is 1 km, however 1 km is 2 miles. As a side note, 1 mile is also 0 km.
January 14th, 2010 at 12:54 pm
This is just silly. We all know the entire world knows and uses American units like miles and feet. No one really uses kilometers.
January 14th, 2010 at 3:40 pm
ok here u all go. i was shown a good way for calculating 1.6x in school. you take 1x, 0.5x and 0.1x and add them up.
your post was an attention-grabbing way of letting us know the coincidence of the two ratios, so thanks.
January 14th, 2010 at 6:24 pm
Using Fibonacci Numbers to Convert from Miles to Kilometers and Vice Versa - good coders code, great reuse
I learned an interesting fact about Fibonacci numbers recently while watching a lecture on number theory. Fibonacci numbers can be …
January 14th, 2010 at 8:14 pm
If instead of
F(n+2) = F(n+1) + F(n)
you use
F(n+2) = 0.54*F(n+1) + 1.72*F(n)
Then F(n+1)/F(n) approaches 1.609, which is even better :)
January 14th, 2010 at 9:50 pm
“This is just silly. We all know the entire world knows and uses American units like miles and feet. No one really uses kilometers.”
Please tell me this was irony.
January 15th, 2010 at 5:56 am
[…] 2010/01/15 作者为 garfeildma 在网上闲逛时发现一篇文章,直接Fibnacci数列直接转换英里和千米。两个相邻的数就是等长的英里和千米,可以先对照Fib数列来看一下: […]
January 15th, 2010 at 6:01 am
用Fibonacci数列转换英里和千米
在网上闲逛时发现一篇文章,直接Fibnacci数列直接转换英里和千米。两个相邻的数就是等长的英里和千米,可以先对照Fib数列来看一下: F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F2…
January 15th, 2010 at 6:12 am
“That’s all there is to it. A pure coincidence that the Golden ratio is almost the same as kilometers in a mile.”
Or is it ? =O
January 15th, 2010 at 6:53 am
Gave rise to a question in my mind: Can we characterize the set of numbers that can be (or conversely can’t be) represented as a sum of fibonacci numbers through number partitioning?
January 15th, 2010 at 7:52 am
Kou, all numbers can be represented as a sum of Fibonacci numbers.
Proof’s really easy: it’s true for n=1. Now suppose it’s true for all n<=k. If n+1 is Fibonacci number, we are done. Otherwise, this number n+1 is bigger than some Fibonacci number Fi. Now let’s look at the number n+1-Fi. As this number is smaller than n+1, then according to the inductive hypothesis it can be expressed as a sum of Fibonacci numbers. Therefore n+1 can be expressed as Fi + (n+1-Fi), where Fi is a Fibonacci number and (n+1-Fi) is a sum of Fibonacci numbers.
January 15th, 2010 at 6:21 pm
That sure was an exciting insight!
BTW, can I use my openID to post comments here?
January 15th, 2010 at 7:13 pm
Um. Um. Yeah, I don’t even know what Fibonacci numbers are! High school student, I feel like I should PROBABLY know what that is… but nope, I got nothing. I’ll bookmark the page since I can never get conversions right, though… =w=
January 15th, 2010 at 7:31 pm
Any natural number N can be expressed as
1 + 1 + 1 + …. + 1 kilometers (x miles = 2x kilometers). So here’s a question…
We know that any natural number can be expressed (not uniquely) as the sum of Fibonacci factors. Given a (potentially huge) natural number, how can you write it as the sum of Fibonacci factors so that the smallest factor is as large as possible?
e.g. for 6
6 = 1 + 5
6 = 2 + 2 + 2
6 = 1 + 2 + 3
6 = 1 + 1 + 2 + 2
6 = 3 + 3
etc.
6 = 3 + 3 is “best” since all other factorizations involve factors less than 3. Similarly, 11 = 5 + 3 + 3 or 11 = 8 + 3 both have smallest factor 3 (and I think you can’t do better).
Brute force works for small numbers, but becomes hard for large ones. Any ideas?
January 15th, 2010 at 7:34 pm
Oops. That’ll teach me to read the line just above the text entry box. The beginning of my post was supposed to say something like
Any natural number N can be expressed as
1 + 1 + 1 + …. + 1 <- N times
but this gives a bad conversion between miles and kilometers (x miles = 2x kilometers). So here’s a question…
January 15th, 2010 at 10:12 pm
@Nathan, i was thinking the same thing. I would start with the list of all Fibonacci numbers less than x (your number to convert). say F(n) is the largest of these. Now add smaller numbers to F(n) starting with F(n-1). If your total ever goes above x, then remove the last number you added and decrement n. stop when your sum equals x. The numbers you’ve added are the factors.
January 16th, 2010 at 12:01 am
[…] 1. Using Fibonacci Numbers to Convert from Miles to Kilometers and Vice Versa […]
January 16th, 2010 at 3:55 am
As a related fact expressing numbers as sums of distinct non-consecutive Fibonacci numbers is called Zeckendorf’s theorem :)
January 16th, 2010 at 3:56 am
Zeckendorf’s theorem it’s a fun theorem :)
January 16th, 2010 at 5:37 pm
Oh thanks. very interested post!
January 18th, 2010 at 3:47 pm
[…] Using Fibonacci Numbers to Convert from Miles to Kilometers and Vice Versa – good coders code,… (tags: fibonacci conversion math interesting mathematics fun miles tips) […]
January 20th, 2010 at 9:15 am
Hang on. So if I want to convert 8 kilometres into miles, I press F7 on my keyboard, and if I want to convert 7 miles into kilometres, I press F8?
It doesn’t seem to work. What am I doing wrong?
January 20th, 2010 at 9:59 am
James Heather, you have the wrong keyboard. It works on mine. :)
January 20th, 2010 at 6:17 pm
This is super interesting. Thanks for putting it up =)
January 20th, 2010 at 9:57 pm
It is purely incidental.
The rapport between a distance expressed in miles and the same distance in km is exactly 1.609344.
The rapport of consecutive fibonacci numbers tends (by continuing with the fibonacci serie) to 1.618033988749894848…
The two numbers differ of about 0.5%, half percent. Approximation of 0.5% is in facts quite good for many purposes.
That’s also the error you will get if you convert big number km in miles with this method: you will always obtain 0.5% km more
January 21st, 2010 at 8:48 am
Interesting observation… that’s what the spirit of science is!
Meanwhile Bob, it’s a frog-in-the-well comment… “This is just silly. We all know the entire world knows and uses American units like miles and feet. No one really uses kilometers.”
Look at the statistics here and the related article here.
January 22nd, 2010 at 8:37 am
Nice idea!!!
…but still, its better to use a calculator rather than memorizing or solving Fibonacci Series of two…hehehehe..
January 29th, 2010 at 3:04 am
Hmmm… I have lived with both systems of measurement my whole life. I have rarely had to do a conversion. Use both long enough and you will get a feel for it. Many people I know can use them interchangeably. Generally, I am not worried by being precise to the tenths, hundredths, or thousandths. That may be required for the Olympic judges or NASA engineers, but not in every day life. I know what driving at 100kms/hr feels like and I know what 100mi/hr feels like. (On most highways I will get a ticket doing the second one.) It’s similar to learning to speak a second or third language. Many times there are no exact translations in the alternate language but you sometimes come close.
February 12th, 2010 at 7:33 pm
The seeds in this post picture is also having Golden Ratio. Its nature ratio too. Am I right?
February 12th, 2010 at 7:38 pm
That’s right, Surya!
February 20th, 2010 at 10:22 am
Nifty, very very nifty. Not really practical (3882mi?) but certainly high in trivia value :)
February 26th, 2010 at 8:24 pm
Awesome example of math tricks that are useful!