Decimal to Fraction Calculator

Convert any signed terminating decimal to an exact reduced fraction and mixed number using place value rather than floating-point approximation.

Enter your values

Enter a signed terminating decimal containing up to 18 digits. Written trailing zeros are preserved during setup.

Simplified fraction

Your result will appear here.

Overview

What is a decimal to fraction calculator?

A decimal to fraction calculator rewrites a finite base-ten decimal as a ratio of integers. The digits become the numerator, a power of ten determined by the decimal-place count becomes the denominator, and the ratio is reduced to lowest terms.

Important terms

Terminating decimal
A decimal with a finite number of written fractional digits.
Numerator
The integer above the fraction bar; here it begins as the decimal digits with the point removed.
Denominator
The positive integer below the fraction bar; initially 10 raised to the number of decimal places.
Lowest terms
A fraction whose numerator and denominator have greatest common divisor 1.
Mixed number
A whole-number part together with a proper fractional remainder.

When this method is useful

  • Expressing exact measurements without decimal notation.
  • Preparing a decimal for fraction arithmetic or ratio work.
  • Checking how trailing decimal places determine powers of ten.
  • Converting an improper result into a mixed number.
Calculator explainer

Decimal to Fraction Calculator

Read the final decimal place

Primary formulad = N / 10ᵖ, then reduce
Worked example2.375 = 2375/1000 = 19/8
Formula

Formula and variables

d=N10p=N÷g10p÷g,g=gcd⁡(N,10p)d=\frac{N}{10^p}=\frac{N\div g}{10^p\div g},\qquad g=\gcd(N,10^p)
d
the terminating decimal
N
the signed integer formed by removing the decimal point
p
the number of fractional decimal places
g
the greatest common divisor of N and 10ᵖ

Every place to the right of the decimal point is a negative power of ten. Combining those digits produces one integer over 10ᵖ; dividing both parts by the same greatest common divisor preserves value while simplifying the fraction.

Domain note: Input must be a standard finite decimal with at most 18 digits. Repeating notation and exponent notation are not accepted; use the repeating-decimal converter for an endless pattern.

Formula visual

Write, then reduce

decimald
=
N10ᵖ
→ divide by g →
N ÷ g10ᵖ ÷ g
p = decimal places · g = greatest common divisor
How it works

How to use this calculator

  1. 1

    Enter the terminating decimal, including its sign and any meaningful trailing zeros.

  2. 2

    Count the digits after the decimal point to determine p.

  3. 3

    Remove the decimal point to form N and place it over 10ᵖ.

  4. 4

    Find the greatest common divisor of the numerator and denominator.

  5. 5

    Divide both by that common divisor and read the reduced fraction or mixed number.

Worked examples

Step-by-step examples

Example 1

Problem: Convert 2.375 to a fraction.

Substitution: 2.375 = 2375/1000; gcd(2375,1000) = 125

Result: 2375/1000 = 19/8 = 2 3/8

The exact value is nineteen eighths, or two and three eighths as a mixed number.

Example 2

Problem: Convert −0.045 to a fraction.

Substitution: −0.045 = −45/1000; divide by 5

Result: −45/1000 = −9/200

The sign belongs to the entire rational number; the normalized denominator remains positive.

Worked-example visual

Example: 2.375 becomes 2⅜

12.375remove the point
→
22375/1000thousandths
→
319/8divide by 125
→
42 3/8mixed number
Method knowledge

Rules, edge cases, and related ideas

Place-value principle

A decimal with p fractional digits represents an integer number of 10⁻ᵖ units.

Equivalent-fraction property

Dividing numerator and denominator by the same nonzero integer does not change the ratio.

Trailing zeros

Writing 0.50 instead of 0.5 changes the initial power-of-ten fraction but both reduce to 1/2.

Sign normalization

A negative result is displayed with the sign on the numerator and a positive denominator.

Edge cases and limitations

  • Zero reduces to 0/1 regardless of the number of written decimal places.
  • A decimal greater than 1 may produce an improper fraction and a mixed-number form.
  • Very long inputs are capped to keep exact integer calculations bounded and responsive.

How this differs from a related concept

This tool accepts finite decimals. Repeating Decimal to Fraction Calculator accepts a fixed prefix plus a recurring digit block and removes the infinite tail algebraically.

Interpretation

Understand the result

The simplified fraction is exact, not a decimal approximation. A denominator of 1 means the decimal represents an integer. The mixed-number line is an alternate representation, not a different value.

Common mistakes

  • Using 10 as the denominator regardless of how many decimal places are present.
  • Forgetting to include placeholder zeros, such as treating 0.04 as 4/10 instead of 4/100.
  • Stopping at the power-of-ten fraction without reducing it.
  • Entering 0.333 as though it were exactly one third; 0.333 is exactly 333/1000.

Frequently asked questions

Is the converted fraction exact?

Yes. The calculator reads the decimal digits directly and uses integer arithmetic, so the reduced fraction exactly equals the finite input.

Why does 0.50 still become 1/2?

It first becomes 50/100. Dividing numerator and denominator by their greatest common divisor, 50, gives 1/2.

Can I convert a negative decimal?

Yes. The sign is preserved and placed on the reduced numerator.

Can I enter scientific notation?

No. Enter the expanded finite decimal so every decimal place is explicit and auditable.

Does 0.333 equal 1/3?

No. A finite input 0.333 equals 333/1000. To represent an endless sequence of threes, use the repeating-decimal calculator.

References & technical sources

Keep calculating

Related calculators