Quick answer
A decimal converts to a fraction by writing the digits over a power of ten and simplifying with the GCD. 0.375 = 375/1000 = 3/8.
Enter a decimal with up to 9 decimal places. The calculator returns the simplified fraction and mixed number.
Related tools: Fraction to Decimal Calculator: Convert a fraction to a decimal, showing repeating digits. Fraction to Percent Calculator: Convert a fraction to a percentage. Fraction Simplifier: Reduce a fraction to lowest terms.
How to use the Decimal to Fraction Calculator
- Enter decimal.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Decimal | A number | — |
Formula and method
Formula
d = digits ÷ 10ⁿ, simplified by the GCD
IEEE-754 double precision; shown to at most 6 decimal places.
Exact for decimals with up to 9 places; repeating decimals are not detected.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Decimal = 0.375.
| Result | Value |
|---|---|
| Fraction | 3/8 |
| Mixed number | 3/8 |
Example 2
Inputs: Decimal = 0.5.
| Result | Value |
|---|---|
| Fraction | 1/2 |
| Mixed number | 1/2 |
Example 3
Inputs: Decimal = 2.25.
| Result | Value |
|---|---|
| Fraction | 9/4 |
| Mixed number | 2 1/4 |
The first line is the headline result (fraction). Below it the decimal to Fraction Calculator lists mixed number, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Steps
0.375 has three decimal places, so it is 375/1000. The GCD of 375 and 1000 is 125, giving 3/8. For 2.75 the answer is 11/4, shown as the mixed number 2 3/4.
Repeating decimals
Terminating decimals convert exactly. Repeating decimals like 0.333… need a different method (that is 1/3). Entering a rounded value gives the fraction of that rounded number.
How the result changes with decimal
Holding every other input at the first worked example, this table changes only decimal. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Decimal | Fraction | Mixed number |
|---|---|---|
| 0.1875 | 3/16 | 3/16 |
| 0.375 | 3/8 | 3/8 |
| 0.75 | 3/4 | 3/4 |
| 1.5 | 3/2 | 1 1/2 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Decimal: entering "x" shows "Decimal must be a number." beside that field and no result.
Choosing between the Decimal to Fraction Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Fraction to Decimal Calculator](/math/fraction-to-decimal-calculator/) | numerator and denominator | Decimal |
| [Fraction to Percent Calculator](/math/fraction-to-percent-calculator/) | numerator and denominator | Percent |
| [Fraction Simplifier](/math/fraction-simplifier/) | numerator and denominator | Simplified |
| [Percent to Fraction Calculator](/math/percent-to-fraction-calculator/) | percent | Fraction |
| [Decimal to Fraction Calculator](/math/decimal/) | decimal | Fraction |
Background: rounding and basic arithmetic
Rounding to a place looks at the digit just to its right: 0 to 4 rounds down and 5 to 9 rounds up (the half-up convention, so 2.5 becomes 3). Rounding 838.274 gives 800 to the nearest hundred, 840 to the nearest ten and 838 to the nearest one.
Some systems use banker's rounding (half to even), which sends 2.5 to 2 and 3.5 to 4; check which convention your task requires, and round only at the end of a multi-step calculation.
Assumptions and limitations
- Up to 9 decimal places
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for decimal to confirm this.
Frequently asked questions
What is 0.25 as a fraction?
0.25 is 25/100, which simplifies to 1/4.
What is 0.125?
0.125 is 125/1000, which simplifies to 1/8.
How many decimal places are supported?
Up to nine decimal places; longer decimals should be rounded before entering.
What does the Decimal to Fraction Calculator calculate?
Convert a terminating decimal to a simplified fraction. It returns Fraction and Mixed number.
What formula does the Decimal to Fraction Calculator use?
d = digits ÷ 10ⁿ, simplified by the GCD. Exact for decimals with up to 9 places; repeating decimals are not detected.
What do I need to enter in the decimal to Fraction Calculator?
You enter Decimal.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Up to 9 decimal places.
What is an example of a decimal to Fraction result?
With decimal 0.375, the fraction is 3/8.
Related calculators
- Fraction to Decimal Calculator — Convert a fraction to a decimal, showing repeating digits.
- Fraction to Percent Calculator — Convert a fraction to a percentage.
- Fraction Simplifier — Reduce a fraction to lowest terms.
- Percent to Fraction Calculator — Convert a percentage to a simplified fraction.
- Decimal to Fraction Calculator — Exact fraction, percent and mixed number for a finite decimal.
- Fraction Calculator — Add, subtract, multiply and divide fractions with simplified and mixed-number results.
- Inch Fraction Calculator — Convert decimal inches to the nearest fractional inch.
- Decimal to Percent Calculator — Convert a decimal to a percentage.
- Percent to Decimal Calculator — Convert a percentage to a decimal.
Sources
- OpenStax, Prealgebra 2e (Rice University): fractions, decimals, percents, ratios and rounding
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.