Skip to content
CalculatorAtlas

Decimal to Fraction Calculator

Tested

Convert a terminating decimal to a simplified fraction.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

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

  1. Enter decimal.
  2. Press Calculate to see the result, and use Reset to start again.
Inputs of the Decimal to Fraction Calculator
InputWhat to enterAllowed values
DecimalA 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.

Results of example 1
ResultValue
Fraction3/8
Mixed number3/8

Example 2

Inputs: Decimal = 0.5.

Results of example 2
ResultValue
Fraction1/2
Mixed number1/2

Example 3

Inputs: Decimal = 2.25.

Results of example 3
ResultValue
Fraction9/4
Mixed number2 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.

How the result changes with decimal
DecimalFractionMixed number
0.18753/163/16
0.3753/83/8
0.753/43/4
1.53/21 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.

Choosing between the Decimal to Fraction Calculator and similar calculators
CalculatorYou enterIt returns
[Fraction to Decimal Calculator](/math/fraction-to-decimal-calculator/)numerator and denominatorDecimal
[Fraction to Percent Calculator](/math/fraction-to-percent-calculator/)numerator and denominatorPercent
[Fraction Simplifier](/math/fraction-simplifier/)numerator and denominatorSimplified
[Percent to Fraction Calculator](/math/percent-to-fraction-calculator/)percentFraction
[Decimal to Fraction Calculator](/math/decimal/)decimalFraction

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.

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.