You can convert a decimal to a fraction by placing the decimal over a power of 10, then simplifying using the greatest common divisor. This Decimal to Fraction Calculator computes the exact simplified fraction for terminating and repeating decimals you enter.
What a Decimal-to-Fraction Conversion Means
A fraction is a ratio of two integers: numerator over denominator. A decimal is another way to write the same value using place values (tenths, hundredths, thousandths, and so on).
To convert decimals, you use a simple rule: write the decimal as a fraction with a denominator of 10, 100, 1000, etc., then reduce it to lowest terms.
Core Formula (Terminating Decimals)
For a decimal with a finite number of digits (like 0.75 or 1.25), the conversion is straightforward:
- Let the decimal be x.
- Count the number of digits after the decimal point: n.
- Write it as: x = (integer formed by digits) / 10^n.
- Simplify the fraction by dividing numerator and denominator by their GCD.
Example: 0.75 has n = 2 digits after the decimal point. It becomes 75/100, which simplifies to 3/4 because gcd(75,100)=25.
How Repeating Decimals Work
Some decimals repeat forever (like 0.3333… or 1.272727…). A terminating fraction exists for repeating decimals, but you need the repeating pattern.
In this calculator, you can enter either:
- Terminating decimals (no repeating pattern), or
- Repeating decimals by specifying the repeating block (for example, repeating block “3” for 0.3333…).
Then the calculator uses the standard repeating-decimal fraction method to produce an exact, simplified result.
Variable Guide (What the Calculator Uses)
| Input | Meaning |
|---|---|
| Value | The decimal number you want to convert (can include a whole number part). |
| Repeating Part | The digits that repeat forever after the non-repeating portion (only needed for repeating decimals). |
| Non-repeating Digits | Digits after the decimal point before the repeating block starts (often 0 for pure repeats like 0.3333…). |
The output is always a simplified fraction with the sign handled correctly for negative values.
Step-by-Step: How the Calculator Gets the Answer
- Parse your input and decide whether it is terminating or repeating based on the repeating fields.
- Build the raw numerator and denominator using the place-value method (terminating) or the repeating-decimal method (repeating).
- Simplify by dividing numerator and denominator by their GCD.
- Return results as an integer numerator and denominator, plus a mixed number when helpful.
This approach produces exact fractions for decimals that match the input format.
Practical Examples (Real Use Cases)
Example 1: Baking and Measuring
If a recipe says 0.5 cups, you can convert it to 1/2 cup to match common measuring tools. Fractions also help when you scale recipes and want clean ratios.
Using the calculator, 0.5 becomes 1/2 immediately.
Example 2: Construction and Layout
In carpentry, measurements like 2.75 inches are often expressed as fractions: 2 3/4. Fractions can be easier to mark precisely with rulers and scales.
The calculator converts 2.75 to 11/4, which is 2 3/4 as a mixed number.
Tips for Getting Accurate Results
- Use repeating input when needed. If the decimal truly repeats, enter the repeating block so the fraction is exact.
- Keep digits consistent. For terminating decimals, entering the full decimal (like 0.125 instead of rounding) gives a cleaner fraction.
- Watch sign. Negative decimals convert to negative fractions (for example, -0.25 becomes -1/4).
Frequently Asked Questions
How do you convert a terminating decimal to a fraction?
Write the decimal as an integer over a power of 10. For example, 0.72 has two digits after the decimal, so it becomes 72/100. Then simplify by dividing top and bottom by their greatest common divisor to get 18/25 in lowest terms.
What if my decimal is repeating, like 0.3333…?
Repeating decimals represent an exact rational value. Use the repeating block method: for 0.3333… let the repeating part be “3” and form a fraction using subtraction between aligned place values. Then simplify to get 1/3 exactly.
Why does the fraction not match my rounded decimal?
Rounding changes the value, so the exact fraction for the rounded number is different from the fraction for the true original number. If you know the original digits, enter them exactly. If it repeats, specify the repeating digits to avoid approximation.
Can every decimal be written as a fraction?
Every terminating decimal can be written as a fraction because it has a finite number of digits. Repeating decimals also become fractions exactly. Non-terminating, non-repeating decimals generally cannot be expressed as a fraction with whole-number numerator and denominator.
How can I tell if a decimal will produce a simple fraction?
Fractions tend to simplify when the denominator shares factors like 2, 3, 5, or 10 with the numerator. For example, decimals with only a few digits often reduce well. Use the calculator to simplify automatically and confirm the lowest terms.
Conclusion
The Decimal to Fraction Calculator converts decimals into simplified fractions using exact math rules. For terminating decimals, it uses place value over powers of 10; for repeating decimals, it uses a repeating-block method and then reduces using GCD.



