Follow me on Twitter for my latest adventures!

**65**Comments January 13, 2010

# Using Fibonacci Numbers to Convert from Miles to Kilometers and Vice Versa

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, F_{n+1} and F_{n}, we know that their ratio F_{n+1}/F_{n} is approximately 1.618. Since the ratio is also almost the same as kilometers per mile, we can write F_{n+1}/F_{n} = [mile]/[km]. It follows that F_{n}·[mile] = F_{n+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.

## Comments

Great...now if you could only tell us an EASY way to express the original number as a sum of Fibonacci numbers... :)

The great thing about the Fibonacci series is that there are plenty of small numbers at the beginning that you can use multiples of to estimate numbers. Take 40 miles for example:

40mi= 5mi*8 (both numbers are in the sequence but we'll use 5)

5mi --> 8km --> 8km*8=64km (the actual distance is 64.3km)

Multiplying by 1.6 is easy enough though and for larger numbers it's probably the way to go.

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 ;)

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:-(

just to make it clear nick, you're saying that they CAN be converted. Very clear.

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...

nice hack...........

Very nice observation. I wonder whether the connection to the golden ratio really is incidental.

It's not likely incidental as the meter depends on an accurate calculation of the circumference of the earth which expresses the golden ratio.

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.

that is less convenient ánd less accurate than multiplying by 1.6!

@ Bill the Lizard:

Thank you Bill. Didn't know about 'Roman miles'.

By the way: Six visual proofs - well done!

Very cute hack. It made me smile.

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.

It would be nice if you put some latex support on your blog.

Nice observation.

Nifty, if not all that useful - as others have said, it's a lot easier to remember, and calculate, the 1.6 multiplier.

Or check your spedometer. Handy conversion chart, and you don't even have to multiply.

good to know, thnx for sharing

Please consider using the International Standard for expressing distances. Helps avoid space craft crashes I've heard. ;)

So 1 mile is 1 km?

Yes, 1 mile is 1 km, however 1 km is 2 miles. As a side note, 1 mile is also 0 km.

This is just silly. We all know the entire world knows and uses American units like miles and feet. No one really uses kilometers.

'American' units?? did we Brits ceed these to America after the Boston Tea Party???

Great original idea but is it really a coincidence?

No, y'all wisely abandoned them when a better system came along. The fact that we Americans stubbornly clung to them (and continue to cling to them) may make it look like you ceded them to us, but in reality it's no one's fault but our own.

That's because Americans are the silly ones and fail to convert to kilometers. For the same reason the whole world speaks English - Americans are too silly to learn foreign languages.

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.

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 :)

"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.

"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

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?

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.

I don't understood properly.Can you explain in some other way

Shi

That sure was an exciting insight!

BTW, can I use my openID to post comments here?

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=

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?

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…

@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.

As a related fact expressing numbers as sums of distinct non-consecutive Fibonacci numbers is called Zeckendorf's theorem :)

Zeckendorf's theorem it's a fun theorem :)

Oh thanks. very interested post!

Hang on. So if I want to convert 8 kilometres into miles, I press

F7on my keyboard, and if I want to convert 7 miles into kilometres, I pressF8?It doesn't seem to work. What am I doing wrong?

James Heather, you have the wrong keyboard. It works on mine. :)

This is super interesting. Thanks for putting it up =)

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

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.

Nice idea!!!

...but still, its better to use a calculator rather than memorizing or solving Fibonacci Series of two...hehehehe..

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.

The seeds in this post picture is also having Golden Ratio. Its nature ratio too. Am I right?

That's right, Surya!

Nifty, very very nifty. Not really practical (3882mi?) but certainly high in trivia value :)

Awesome example of math tricks that are useful!

Great insight. Now I need to look for a reason to spout off this trivia!

Fibonacci is very complex for me!

the relationship between the current european coin and the old spanish coin has a fibonacci sequence as well

This is actually called Binet's formula - http://en.literateprograms.org/Fibonacci_numbers_%28Python%29

Nice observation. :)

Of course everyone is quite right with "It's easier to Goggle or use my calculator", however this is a handy way to quickly approximate figures in your head.

Another handy way for programmers (like I once was) is to use hexadecimal to decimal conversions. Having dealt with the large round numbers daily, they become ingrained and 30hex = 48dec or 100dec = 64hex is instantly retrievable. If we say that km = decimal and that miles = hexadecimal, the (approximate!) conversions are easy.

I had to have a system such as this as I have an imported sports car which I refused to mutilate by changing the speedo. e.g. if my km speedo tells me 50kph, I know it's around 30mph, if it said 100kph, that's roughly 64mph.

Another interesting relationship... hexadecimal has a 1.6 ratio to decimal... so the above analogy is an excellent way for those of us less mathematically adept to understand this math talk.

So, then its possible that all numbers are conveniently designed to convert to another system, via this "1.6 Golden Ratio"? Or is that stretching it a bit?

Awesome, whoa:) that's really great:)

I think, I'll do some experiments with fibonacci numbers and some 2d/3d graphs :) thanks for idea :)

Very good article and nice tool

I want to post this article on my web site almekhlafi portal with write this site source if you no have any problem

________________.OO._____________

________________.OOO.____________.O. * .* ..

________________.OOOO.______-.OOO. * .* . *

________________.OOOOO._-.OOOO. * .* ..

_______________.OOOOOOOOOOO. * . * . * .

__________-.OOOOOOOOOOOOO. * .* ..

_____.OOOOOOOOOOOOOOOOOOO* . * . * . *

__________-.OOOOOOOOOOOOO. * . * . * ..

_______________.OOOOOOOOOOO. * . * . * ..

________________.OOOOO._-.OOOO. * . *. * .

________________.OOOO.______-.OOO. * .* ..

________________.OOO.____________.O. * . *. * .

________________.OO.__________

________________.O.__________

Thankyou

You wrote:

>while watching a lecture on number theory.

Could you give me a link to that lecture (I asumed that this is online lecture)?

For all the naysayers, the author is just trying to prove a theory.. We all (including the brilliant author) know that 1.6xKM = miles, but this is a pretty intriguing observation.. So just shup up, shove it, and read and digest the fact. And if you cannot come up with awesome ideas like these, too bad for you losers.. Well done Peteris..

Miles to KM

A nice mental method for multiplying by 1.6 is to double the number 4 times then divide by 10.

e.g. 25 miles -> 50, 100, 200, 400, 40km

27miles-> 54, 108, 216, 432, 43.2 km

Since the ratio of the Fibonacci numbers approximates the golden ratio as the numbers get bigger, you can just memorize a few of the bigger ones and move the decimals where they're needed. Instead of using 1 <-> 2, you can use 102,334,155 <-> 165,580,141, so 1.02 <-> 1.67, or 2,504,730,781,961 <-> 4,052,739,537,881, so 25.0 <-> 40.5.

## Leave a new comment