Converting a decimal into a fraction is one of the most useful skills in everyday math. Recipes, tape measures, engineering drawings, medicine dosages, and money all mix decimals and fractions on the same page. A measurement of 0.625 inches on a printout means nothing to a machinist who works in sixteenths and eighths — but 0.625 is exactly 5/8 of an inch. This calculator takes any base-10 decimal and returns the fully reduced fraction, the mixed number, and the matching percent, instantly.
The engine builds the fraction from the decimal digits: multiply the decimal by 10^k (where k is the number of decimal places), then reduce the resulting integer numerator and denominator by their greatest common divisor. Enter a number, tell it how many digits appear after the decimal point, and read the reduced fraction, mixed number, and percent.
How to Use
- Type your Decimal Number into the first box. It can be positive or negative, less than 1 or greater than 1 — for example
0.625,-1.75, or1000000.5. - Set Decimal Places to the number of digits that appear after the decimal point:
3for 0.625,2for 1.75,1for 0.5. This is the key input — it tells the engine what power of ten to write the numerator over. - Set Repeating Digits (trailing) to
0(the default) if your decimal ends after a finite number of places, such as 0.25 or 0.625. If a tail repeats forever, enter how many digits repeat (e.g.1for 0.333...,2for 0.121212...). The engine then solves the exact repeating fraction algebraically instead of stopping at the terminating digits you typed. - Set Percent Decimal Places to control rounding on the percent output.
- Read the result card: Numerator and Denominator show the reduced integers, Mixed Number rewrites values greater than 1 as a whole number plus a proper fraction, and Percent Equivalent is the same value as a percentage.
There is no rounding to guess at for terminating decimals. The engine writes the digits over a power of ten and then divides numerator and denominator by their greatest common divisor, so 0.25 becomes 1/4 rather than 25/100. For repeating tails, the engine applies the geometric-series shortcut directly: it subtracts the finite prefix from the infinite part and reduces the resulting fraction, so 0.333... comes out as the exact 1/3 rather than a terminating stand-in.
How the Conversion Works
For a terminating decimal, say 0.625, write it over the power of ten matching the last decimal place: 0.625 = 625/1000. Then divide numerator and denominator by their greatest common divisor. gcd(625, 1000) = 125, so 625 ÷ 125 = 5 and 1000 ÷ 125 = 8. The result is 5/8.
For a repeating decimal, the trick is to subtract the finite part from the infinite part. Let x = 0.333... Multiplying by 10 (one repeating digit) gives 10x = 3.333..., and subtracting x cancels the repeating tail: 9x = 3, so x = 3/9 = 1/3. For 0.1666... (one repeating digit after a non-repeating prefix of length 1), 100x − 10x = 16 − 1 = 15, and 90x = 15, giving 1/6. In general, with a non-repeating prefix of length p and a repeating block of length r, the denominator is 10^(p+r) − 10^p.
To turn the result into a percent, multiply the fraction by 100. 5/8 = 0.625 = 62.5%, and 1/3 ≈ 33.33%. That percent column is the quickest way to sanity-check your answer against everyday intuition.
How to Fill In the Form (step by step)
The two trickiest boxes just ask you to count digits — here is exactly how:
- Decimal Number: type the value itself, e.g.
0.333. - Decimal Places: count how many digits actually sit after the dot. For
0.333that is 3; for1.75it is 2; for a whole number like2it is 0. - Repeating Digits: count how many trailing digits repeat forever. Type 0 for an ordinary terminating decimal. Examples:
0.333…(the 3 repeats) → 1;0.121212…(the block12repeats) → 2;0.1666…(the 6 repeats) → 1. - Percent Decimal Places: leave at 1 unless you want a whole-number percent.
Worked fill for the classic 0.333 → put Decimal 0.333, Decimal Places 3, Repeating Digits 1, and read off 1/3. Worked fill for 0.121212 → Decimal 0.121212, Decimal Places 6, Repeating Digits 2, and read off 4/33.
How to Read the Result
The card prints the numerator and denominator as separate whole numbers — put them together as a fraction. Numerator = 5, Denominator = 8 → read as 5/8. If the value is 1 or above, the same card also gives the mixed-number pieces: Whole Part = 1, Fraction Numerator = 3, Denominator = 4 → read as 1 3/4. The percent row is a plain number already carrying the percent sign, so 62.5 means 62.5%. The engine works on exact integers and cannot print the joined string "5/8" on its own; reading the two fields together is the fraction.
Examples
Example 1 — A terminating decimal from a tape measure. Enter 0.625 with 0 repeating digits. The calculator returns 5/8, a numerator of 5, a denominator of 8, the mixed number 5/8 (already less than 1), and 62.5%. A machinist now reads 0.625 inches cleanly as five eighths.
Example 2 — A repeating decimal. Enter 0.333 with Decimal Places = 3 and Repeating Digits = 1. The engine applies the repeating closed form (333 − 33) ÷ (1000 − 100) = 300/900, reduces it by GCD 300, and returns the exact 1/3 with 33.3%. The repeating-digit count is what makes the infinite tail exact instead of an approximation.
Example 3 — A value greater than 1, shown as a mixed number. Enter 1.75 with 0 repeating digits. The reduced improper fraction is 7/4; because the numerator exceeds the denominator, the mixed number reads 1 3/4, and the percent is 175%.
Example 4 — A negative decimal. Enter -0.625. The sign is preserved, so the answer is -5/8 with a percent of -62.5%. Negative fractions keep the minus on the numerator.
Example 5 — A very large decimal. Enter 1000000.5 with 0 repeating digits. Half a million plus one half is exactly 2000001/2, written as the mixed number 1000000 1/2. Even numbers at or above one million convert without rounding error, because the engine works on exact integers.
FAQ
How do I convert a decimal to a fraction by hand?
Count the decimal places, write the digits over a 1 followed by that many zeros, then reduce by the greatest common divisor. For 0.625 there are three places, so write 625/1000 and divide by 125 to get 5/8. The calculator does this reduction automatically.
What is 0.333... as a fraction?
The true value 0.333... (the digit 3 repeating forever) is exactly 1/3. Type 0.333, set Decimal Places to 3 and Repeating Digits to 1, and the calculator applies 9x = 3, so x = 3/9 = 1/3 — the exact repeating result, with about 33.3% as the percent equivalent.
How do I turn a repeating decimal like 0.121212... into a fraction?
Type 0.121212, set Decimal Places to 6 and Repeating Digits to 2. The engine uses the general repeating formula (121212 − 1212) ÷ (1,000,000 − 10,000) = 120,000/990,000, which reduces by GCD 30,000 to the exact 4/33. The same idea by hand: with a non-repeating prefix of length p and a repeating block of length r, the denominator is 10^(p+r) − 10^p.
What is the difference between a fraction and a mixed number?
A fraction like 7/4 combines the whole and the parts into one numerator over one denominator. A mixed number like 1 3/4 separates the whole units (1) from the proper fraction (3/4). This calculator shows both: the simplified fraction as the main answer and the mixed number whenever the value is 1 or larger.
Can I convert a negative decimal?
Yes. Enter a negative number such as -0.625 and the calculator keeps the minus sign on the numerator, returning -5/8. The percent equivalent is likewise negative (-62.5%). For a value below −1 such as −1.75, the sign rides on the whole part of the mixed number: the result is −1 3/4 (fraction −7/4), never a positive 1 3/4 with a stray minus on the fraction.
How do I read a decimal as a percentage?
Multiply the decimal by 100. 0.625 becomes 62.5%, 1.75 becomes 175%, and -0.625 becomes -62.5%. The Percent Equivalent column on this page does that multiplication for you.
Why is 0.2 not exactly 1/5?
On a computer, 0.2 is stored as a binary floating-point number that is very slightly larger than the real decimal 0.2. Using Fraction.from_float exposes that tiny artifact. For exact teaching values, type the decimal you intend and the calculator reduces it; for repeating values, always supply the repeating-digit count so the engine solves the exact infinite series instead of relying on the float.
Disclaimer
This decimal-to-fraction calculator is provided for informational purposes only. It performs exact arithmetic on the decimal digits you enter and on the repeating pattern you specify, but it does not constitute mathematical, engineering, or teaching advice. Always double-check critical measurements, dosages, or financial figures by hand, and confirm that the repeating-digit count matches the decimal you intended to convert. For our editorial standards see the About page, and for data handling see the Privacy Policy; we do not store the numbers you enter on this page.