Terminating or Repeating Decimal Calculator

Reduce a fraction and classify its base-ten decimal expansion by testing whether the denominator contains prime factors other than 2 and 5.

Enter your values

The calculator first reduces the fraction, then tests the prime factors of its positive denominator.

Expansion type

Your result will appear here.

Overview

What is a terminating or repeating decimal calculator?

A terminating or repeating decimal calculator predicts the behavior of a rational number's base-ten expansion without waiting for many division digits. In lowest terms, a denominator built only from powers of 2 and 5 divides some power of 10; any other remaining factor forces a remainder cycle.

Important terms

Lowest terms
A fraction after every common numerator-denominator factor has been removed.
Prime factor
A prime number that divides an integer exactly.
Terminating decimal
A decimal expansion that reaches remainder zero after finitely many places.
Repeating decimal
A nonterminating rational expansion with a periodic digit block.
Base ten
The numeral system whose place values are powers of 10 = 2 × 5.

When this method is useful

  • Predicting whether fraction division will end.
  • Choosing an appropriate exact or approximate representation.
  • Teaching the connection between denominator factors and decimal behavior.
  • Checking a long-division result for an expected repeat.
Calculator explainer

Terminating or Repeating Decimal Calculator

The reduced denominator decides

Primary formulad = 2ᵃ × 5ᵇ ⇔ the reduced fraction terminates
Worked example7/40 = 0.175; 1/6 = 0.1(6)
Reduce n/dlowest terms
→
Remove 2s and 5sfactor denominator
→
nothing remainsterminatingother factor remainsrepeating
Formula

Formula and variables

nd in lowest terms terminates ⟺d=2a5b\frac{n}{d}\text{ in lowest terms terminates }\Longleftrightarrow d=2^a5^b
n/d
the fraction after reduction
d
its positive reduced denominator
a, b
nonnegative counts of factors 2 and 5

A terminating base-ten decimal is an integer divided by 10ᵏ. Because 10ᵏ = 2ᵏ5ᵏ, a reduced denominator can divide a power of ten only when it has no prime factors other than 2 and 5.

Domain note: Inputs must be integers with a nonzero denominator. Classification applies to rational numbers represented by fractions and specifically to their base-ten expansions.

Formula visual

Prime-factor criterion

nd
in lowest terms
d = 2ᵃ × 5ᵇterminates after at most max(a,b) places
d has another factordecimal repeats
How it works

How to use this calculator

  1. 1

    Enter the numerator and nonzero denominator.

  2. 2

    Reduce the fraction to lowest terms.

  3. 3

    Factor every 2 and 5 out of the positive reduced denominator.

  4. 4

    If the remaining factor is 1, classify the decimal as terminating; otherwise classify it as repeating.

  5. 5

    Inspect the exact or parenthesized decimal form for confirmation.

Worked examples

Step-by-step examples

Example 1

Problem: Will 7/40 terminate or repeat?

Substitution: 40 = 2³ × 5 after reduction

Result: Terminating: 7/40 = 0.175

The denominator uses only 2 and 5, so it divides a power of ten.

Example 2

Problem: Will 5/18 terminate or repeat?

Substitution: 18 = 2 × 3²; factor 3 remains

Result: Repeating: 5/18 = 0.2(7)

The factor 3 cannot be absorbed into a power of ten, so long division enters a remainder cycle.

Worked-example visual

Compare two denominator tests

7/4040 = 2³ × 50.175 terminates
1/66 = 2 × 30.1(6) repeats
Method knowledge

Rules, edge cases, and related ideas

Reduce first

A removable factor can hide the true denominator test; for example, 3/6 reduces to 1/2 and terminates.

Why 2 and 5

They are the only prime factors of the base, 10. A different numeral base would have a different termination criterion.

Rational expansion

Every ratio of integers with nonzero denominator has a decimal that either stops or eventually repeats.

Place bound

For d = 2ᵃ5ᵇ, multiplying numerator and denominator as needed produces denominator 10^max(a,b).

Edge cases and limitations

  • A zero numerator reduces to 0/1 and terminates.
  • A denominator of ±1 produces an integer and therefore terminates.
  • The sign of the fraction does not affect whether its digits terminate or repeat.

How this differs from a related concept

Fraction to Decimal Calculator performs and visualizes division. This classifier foregrounds the number-theoretic denominator proof and uses digit generation only as confirmation.

Interpretation

Understand the result

The classification describes the complete base-ten expansion, not merely the digits currently displayed. For terminating fractions, the maximum of the factor counts of 2 and 5 gives the required decimal-place bound after suitable numerator scaling.

Common mistakes

  • Testing the original denominator before reducing the fraction.
  • Assuming an even denominator always terminates.
  • Looking for 10 as an explicit factor instead of checking prime factors 2 and 5.
  • Calling an irrational, nonperiodic decimal repeating; this tool classifies rational fractions only.

Frequently asked questions

Why must I reduce the fraction first?

Common factors may cancel a denominator factor that would otherwise suggest repetition. Classification depends on the reduced denominator.

Does every rational number terminate or repeat?

Yes. Integer long division has finitely many possible remainders, so it reaches zero or eventually repeats a remainder.

Does a negative fraction change the classification?

No. The sign changes the location on the number line, not the denominator-factor structure.

How many places will a terminating decimal have?

After reduction, if d = 2ᵃ5ᵇ, the expansion needs no more than max(a,b) places, though trailing zeros may make the visible form shorter.

Why does factor 3 cause repetition in base ten?

No power of 10 contains factor 3, so a reduced denominator containing 3 cannot divide a power of ten exactly.

References & technical sources

Keep calculating

Related calculators