Decimal to Fraction

FeaturedContest Winner
Picture of Decimal to Fraction
You're here because you have a question, a math question.

I don't know who asked you this math question. Maybe it was your math teacher, or your mother, or a friend, or your employer. Or maybe this is a math question you have asked yourself.

Still the question remains, like a splinter in your mind:

Decimal to Fraction?

The answers are out there Neo, and they're waiting for you. When you're ready, this instructable will help those answers to find you.

By the way, this phrase, "Decimal to Fraction", denotes a topic, one of several in an official Instructables contest (the details of which I found here: ) Also per the rules of this contest, the phrase "Decimal to Fraction" is the title of this Instructable.

Anyway, I should get back to explaining, or perhaps guessing, why you're here.

You are here because you wish to covert a positive rational number in decimal form into a fraction, a ratio of two integers. Or perhaps you want the answer in the form of a mixed fraction, the sum of an integer and a proper fraction.

Below I have written some question-answers, with the decimal representation "question" part on the left side of these equations, and the "answers" in fraction and mixed fraction forms, on the right side.
3.125 = 3125/1000 = 25/8 = 3 + 125/1000 = 3 + 1/8 0.00314 = 314/100000 = 157/50000 3.141414... = 311/99 = 3 + 14/99 3.456666... = 3111/900 = 1037/300 = 3 + 137/300

Is this the form of the question you had in mind?

Step 3 and Step 9 demonstrate methods for the easy case of converting a regular, non-repeating, decimal number.

Methods for converting a repeating decimal number are revealed in Step 7, and using a slightly different trick in Step 11. The method shown in Step 7, the Subtraction Trick, is best if you want your answer left in the form of an improper fraction. The method in Step 11 quickly takes you to an answer in mixed fraction form.

The other Steps, {1,2,4,5,6,8,10,12}, are there to explain everything else that I felt was worth explaining.

There's a very good chance you are reading this by way of a computer of some kind. If you already own a computer, and you have a burning desire to solve math problems, there's no reason why you should not have a copy of Octave. Octave is an advanced numerical problem solving tool. It's the open-source clone of a commercial product called MATLAB. Basically Octave is a mutant calculator on steroids! If you want to do some serious number crunching, and you want to do it for free (minus the effort of installing it and learning how to use it), you want a copy of Octave. It's waiting for you, here:

This instructable might quote some Octave code in a few places. The same commands usually work with MATLAB. Also your expensive graphing calculator might be able to do some, but not all, of the tricks Octave/MATLAB can do.

Of course for the purist, there's always pencil and paper...
Remove these adsRemove these ads by Signing Up
iceng1 year ago
I do a lot of work using an Integer Basic that needs to work with decimal fractions +-32,000•00000
and even double precision variables need to use some of the techniques you describe here.

And some I did not know.  I especially like the over-bar description of endless repeating fractions.

Jack A Lopez (author) 4 years ago
I just noticed that, for some reason, a bunch of line-breaks were missing from certain parts of this instructable, so that text that used to look like:
wound up looking like:
That is to say, totally f-d up, and unreadable.  I suspect this was the work of some Official Instructables robot going through and updating the markup language, which they change every so often for some reason.  

I think I fixed all the damage, but if I didn't please comment, I mean, in the unlikely event that someone besides me actually reads this 'ible.
A handy way to remember the decimals in sevenths (mentioned in the 7th step) is 7 14 28 5.. Two times 7 is 14, two times 14 is 28, two times 28 is 56 but the repeat starts after the 5 so you only end up with 7 14 28 5..restart 7 14.. and so on. Any /7 remainder in decimals you only have to check what digit to start with - 2/7 -> 20/7 first digit will be 2. Then go from there, 0.285714285... Not that relevant to factoring, but kind of neat.
Jack A Lopez (author)  LarrySDonald5 years ago
That is kind of neat ...7 14 28 5 ... Among the fractions {1/2, 1/3, 1/4, 1/5,1/6,1/7,1/8, 1/9} , 1/7 is the one with the weirdest decimal representation, and the hardest to remember... Thanks for the tip!
No prob. It's kind of a neat party trick (for very specific geekly parties) to quote percentages of stuff that there happens to be seven of. Aww man, twenty eight point five seven one four two percent of my meatballs are burned!
s/factoring/fraction to decimal/g
Jack A Lopez (author) 5 years ago
I noticed the proof in Step 10 had some kinda serious typos, places where "-n" that should have been "+n", and a "greater than" sign that should have been "greater than or equals". I decided these were serious enough to re-edit the picture containing this proof and upload it again. Hopefully that will be the last correction.
Jack A Lopez (author) 5 years ago
Hey everybody! Thank you to whoever it is who voted/decided this instructable was a winner for answering the "Decimal to Fraction" question. The subject of repeating decimals has always been interesting to me, especially repeating nines. One thing I forgot to mention in this instructable is the cultural phenomena of marketeers who offer their wares with prices ending in nines, e.g. $0.99 < $1.00 $19.99 < $20.00 The other day I found a beautiful 1.999 in the wild, and I decided to take a picture of this and add it to Step 10. BTW, if this ible has any really obvious errors, e.g. math errors, please point them out to me. Any other comments, positive or negative, are also welcome.