Arithmetic, Algebra & Number Theory Fractions, Decimals & Rounding Euclidean algorithm (Euclid, Elements VII.1–2)

Simplifying Fractions Calculator

Enter any numerator and denominator and this calculator reduces the fraction to lowest terms, shows the greatest common divisor it divided by, and works the Euclidean algorithm out line by line so you can reproduce it on paper. It also gives the mixed-number form for improper fractions, the exact decimal and percent values, and a list of equivalent fractions built by multiplying the reduced form back up. Negative numerators and denominators are handled the standard way, with the sign moved onto the numerator.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Numerator (top number)The number above the line. Whole numbers only — decimals are rounded to the nearest integer.84
Denominator (bottom number)The number below the line. It cannot be zero, because dividing by zero has no value.126
Equivalent fractions to listHow many multiples of the reduced fraction to show in the table below.8

It returns

  • Fraction in lowest terms — The reduced form: numerator and denominator share no factor except 1.
  • Greatest common divisor used
  • Mixed-number form — A whole part plus a proper fraction, for values of one or more.
  • Decimal value
  • As a percentage

The formula

ab=a÷gb÷g,g=gcd(a,b)
gcd(a,b)=gcd(b,amodb)

In plain text: a/b = (a ÷ g) / (b ÷ g), where g = gcd(a, b)

  • aNumerator, the number above the line (integer)
  • bDenominator, the number below the line (never zero) (integer)
  • gGreatest common divisor of a and b (integer)

Dividing top and bottom by the same non-zero number leaves the value unchanged. Dividing by the greatest such number leaves nothing further to cancel, which is what 'lowest terms' means.

Updated Category Fractions, Decimals & Rounding Verified against published test cases Reading time 11 min

What it means for a fraction to be in lowest terms

A fraction is in lowest terms when the only whole number that divides both the top and the bottom is 1. The fraction 84/126 is not: both numbers are even, both are divisible by 3, and both are divisible by 7. The fraction 2/3 is, and it names exactly the same quantity.

The reason you are allowed to cancel is that multiplying or dividing both parts of a fraction by the same non-zero number is the same as multiplying by 1. Going from 84/126 to 2/3 divides both by 42, which is dividing by 42/42 — and 42/42 is 1. Nothing about the value changes; only the way you have written it does.

Lowest terms matter for three practical reasons. Reduced fractions are far easier to compare: you can see at a glance that 2/3 is bigger than 3/5, but 84/126 against 3/5 takes work. They keep later arithmetic small, so adding fractions with the adding and subtracting fractions calculator produces manageable denominators instead of six-digit ones. And almost every marking scheme in school mathematics expects the simplest form, so an unreduced answer loses marks even when the value is right.

The greatest common divisor and Euclid's algorithm

To reduce a fraction in one move you need the greatest common divisor of the numerator and denominator — the largest whole number that divides both exactly. Divide by anything smaller and you will have to reduce again; divide by the greatest one and you are finished.

You can find it by listing prime factors: 84 = 2 × 2 × 3 × 7 and 126 = 2 × 3 × 3 × 7, so the shared factors are 2, 3 and 7, and their product 42 is the GCD. That works, but factoring gets slow for large numbers, and it is not what a computer does.

The efficient method is 2,300 years old. Euclid's Elements, Book VII, Propositions 1 and 2, gives the algorithm: divide the larger number by the smaller, keep the remainder, then repeat with the smaller number and that remainder. When the remainder reaches zero, the last non-zero remainder is the GCD. It works because any number dividing both x and y also divides xqy, so every step preserves the full set of common divisors while shrinking the numbers fast.

For 84 and 126: 126 = 1 × 84 + 42, then 84 = 2 × 42 + 0. The remainder is zero, so the GCD is 42. Two lines, no factoring. The calculator prints these lines under the result, and the greatest common factor calculator runs the same algorithm on any pair of numbers on its own.

Worked example: reducing 1071/462 by hand

This pair is the example Euclid's algorithm is usually taught with, because prime-factoring both numbers is genuinely tedious and the algorithm finishes in three lines.

  1. Divide the larger by the smaller. 1071 ÷ 462 = 2 remainder 147, because 2 × 462 = 924 and 1071 − 924 = 147. Write it as 1071 = 2 × 462 + 147.
  2. Repeat with 462 and 147. 462 ÷ 147 = 3 remainder 21, because 3 × 147 = 441 and 462 − 441 = 21. So 462 = 3 × 147 + 21.
  3. Repeat with 147 and 21. 147 ÷ 21 = 7 remainder 0, because 7 × 21 = 147 exactly. So 147 = 7 × 21 + 0.
  4. Read off the GCD. The remainder has hit zero, so the last non-zero remainder, 21, is the greatest common divisor.
  5. Divide both terms. 1071 ÷ 21 = 51 and 462 ÷ 21 = 22, giving 51/22.
  6. Check it is finished. 22 = 2 × 11 and 51 = 3 × 17. No shared factor, so 51/22 is in lowest terms.
  7. Convert to a mixed number. 22 goes into 51 twice with 7 left over, so 51/22 = 2 7/22. As a decimal, 51 ÷ 22 = 2.318182 to six places.

Compare that with prime factorisation: you would need 1071 = 3 × 357 = 3 × 3 × 119 = 3 × 3 × 7 × 17 and 462 = 2 × 3 × 7 × 11, then intersect the lists to get 3 × 7 = 21. Same answer, considerably more work — and much more room for an arithmetic slip.

Reading the result: proper, improper and mixed forms

Once a fraction is reduced, its shape tells you where the value sits. If the numerator is smaller than the denominator the fraction is proper and the value is between 0 and 1. If the numerator is larger the fraction is improper and the value is more than 1, so the calculator also shows the mixed-number form. If the reduced denominator is 1, the fraction was a whole number all along: 45/9 reduces to 5.

Improper and mixed forms are equally correct, and which one you want depends on the task. Mixed numbers read better in everyday contexts — 2 7/22 of a tank is easier to picture than 51/22. Improper fractions are far easier to compute with, because you can multiply and divide them directly; converting a mixed number back before doing algebra is a standard first step, and the mixed number to improper fraction calculator does it in one move.

The sign is worth a note. −8/12, 8/−12 and −(8/12) are all the same number, and the conventional written form puts the single minus sign on the numerator or in front of the whole fraction. This calculator normalises to that form, so a negative denominator you type will come back with the sign moved up.

Whether the decimal terminates or repeats is decided entirely by the reduced denominator. A denominator whose only prime factors are 2 and 5 gives a terminating decimal; any other prime factor gives a repeating one. That is why 3/8 = 0.375 stops and 2/3 = 0.6666… does not — and why you must reduce before applying the test, since 6/16 looks like it has a factor of 2 too many until you cancel it. The fraction to decimal calculator shows the repeating block explicitly.

Common fractions in lowest terms, with decimal and percent

Fractions worth recognising on sight, each shown unreduced, reduced, and as a decimal and percentage.
As often writtenGCDLowest termsDecimalPercent
2/421/20.550%
25/100251/40.2525%
6/823/40.7575%
10/1552/30.66666766.6667%
4/1241/30.33333333.3333%
6/1623/80.37537.5%
15/2553/50.660%
14/1627/80.87587.5%
9/1233/40.7575%
84/126422/30.66666766.6667%
1071/4622151/222.318182231.8182%

Decimals are shown to six places. The denominators 2, 4, 8, 16, 5 and 25 terminate because their only prime factors are 2 and 5; those with a factor of 3, 11 or 22 repeat.

Where reducing goes wrong

  • Stopping after one cancellation. Dividing 84/126 by 2 gives 42/63, which still cancels by 21. Divide by the greatest common divisor and you are finished in one step.
  • Cancelling across an addition. In (4 + 6)/8 you may not cancel the 4 with the 8. Cancelling is only valid on factors of the whole numerator and denominator, so add first: 10/8 = 5/4.
  • Cancelling a term inside a sum in algebra. (x + 3)/3 is not x + 1 and not x. Only a common factor of the entire top and bottom can go.
  • Assuming a bigger denominator means a bigger fraction. 2/3 is larger than 3/5 even though 5 exceeds 3. Compare the reduced decimals, or cross-multiply: 2 × 5 = 10 against 3 × 3 = 9.
  • Reducing a ratio the wrong way. A ratio 84 : 126 reduces to 2 : 3 by the same GCD, but a ratio is not a fraction of the whole — 2 : 3 means two parts in five. Use the simplify ratio calculator when the context is parts of a total.
  • Leaving a negative sign on the denominator. Write −2/3, not 2/−3. Both are the same value but only one is standard form.
  • Rounding the decimal and calling it the answer. 0.67 is not 2/3, and substituting it into further work introduces error that grows. Stay in fractions until the end.

Why the algorithm matters beyond homework

Reducing a fraction looks like a schoolroom chore, but the GCD sits underneath a surprising amount of working mathematics. Every exact-rational arithmetic library — the kind used in computer algebra systems and in financial code that cannot tolerate binary rounding — reduces after every operation, precisely so that numerators and denominators do not grow without bound. The Euclidean algorithm is what they call, because it runs in a number of steps proportional to the number of digits rather than to the size of the numbers.

The same algorithm, extended slightly, computes modular inverses and therefore underpins RSA key generation. Its running time was the subject of one of the first formal analyses of an algorithm, in Knuth's The Art of Computer Programming, Volume 2. Very little that is 2,300 years old is still the best available method.

Two neighbouring tools finish the picture. The prime factorization calculator gives the factor lists behind the GCD when you want to see why a particular divisor is the greatest. The least common multiple calculator gives the other half of fraction arithmetic: the GCD tells you how far a fraction reduces, while the LCM tells you what denominator two fractions must share before you can add them. They are linked exactly, by gcd(a, b) × lcm(a, b) = a × b.

Key terms

Lowest terms
A fraction whose numerator and denominator share no common factor except 1. Also called simplest form or reduced form.
Greatest common divisor (GCD)
The largest whole number that divides two integers exactly. Also called the greatest common factor or highest common factor.
Equivalent fractions
Different-looking fractions with the same value, obtained by multiplying or dividing the numerator and denominator by the same non-zero number.
Proper fraction
A fraction whose numerator is smaller than its denominator, so its value lies strictly between −1 and 1.
Improper fraction
A fraction whose numerator is at least as large as its denominator, so its magnitude is 1 or more. Perfectly valid, and easier to compute with than a mixed number.
Mixed number
A whole number written next to a proper fraction, such as 2 7/22, meaning the whole plus the fraction.

Frequently asked questions

How do I know when a fraction is fully simplified?

When the greatest common divisor of the numerator and denominator is 1. A quick check is to try the small primes in order: if neither number is divisible by 2, 3, 5, 7 or 11, and the numbers are under about 150, you are almost certainly done. The rigorous check is the Euclidean algorithm itself — run it and see whether it terminates at a remainder of 1. The calculator says so explicitly whenever the fraction you entered was already reduced.

What is the greatest common divisor of 84 and 126?

42. Prime-factoring gives 84 = 2 × 2 × 3 × 7 and 126 = 2 × 3 × 3 × 7, and the shared factors 2 × 3 × 7 multiply to 42. Euclid's algorithm reaches the same answer in two lines: 126 = 1 × 84 + 42, then 84 = 2 × 42 + 0. Dividing both terms of 84/126 by 42 gives 2/3.

Can a fraction with a prime denominator be simplified?

Only if the numerator is a multiple of that prime. A prime p has just two divisors, 1 and itself, so gcd(a, p) is p when p divides a and 1 otherwise. That makes 14/7 reducible to 2, while 13/7 is already in lowest terms. The same logic explains why fractions with denominator 11, 13 or 17 so often resist cancelling.

Should I give my answer as an improper fraction or a mixed number?

Follow whatever your course or context asks for; both are correct. Mixed numbers communicate size better and are standard in recipes, measurements and everyday speech. Improper fractions are the working form in algebra, because you can multiply, divide and substitute them directly. A common convention is to work in improper fractions and convert to a mixed number only in the final written answer.

Why does the calculator move a minus sign from the denominator to the numerator?

Because −a/b, a/−b and −(a/b) are the same number, and the first is the conventional written form. Leaving the sign underneath makes later steps error-prone: it is easy to lose track of it when finding a common denominator or cross-multiplying. Normalising the sign upward once, at the start, removes that whole class of mistake.

How can I tell whether the decimal will terminate or repeat?

Reduce the fraction first, then look at the prime factors of the denominator. If they are only 2s and 5s, the decimal terminates; anything else makes it repeat. So 3/8 terminates at 0.375 because 8 = 2³, while 2/3 and 51/22 repeat because 3 and 11 are present. The reduction step matters: 6/16 would look wrong under the test if you did not first cancel it to 3/8.

Does simplifying change the value of a fraction?

Never. Dividing the numerator and denominator by the same non-zero number is multiplying by a form of 1, so the value is untouched and only the notation changes. This is exactly why the decimal column in the equivalent-fractions table stays constant down every row. If a reduction ever appears to change the value, an arithmetic slip has crept in — check the division of both terms by the GCD.

What happens if the numerator is zero?

The fraction is worth zero, and the reduced form is 0 — or 0/1, if a fraction is required. Mathematically gcd(0, b) is b, because every whole number divides zero exactly, so the calculator reports the denominator as the divisor used and returns 0. A zero denominator is a different matter entirely: it is undefined, and the calculator returns no value with a warning.

Is the greatest common divisor the same as the greatest common factor?

Yes — greatest common divisor, greatest common factor and highest common factor are three names for the same quantity, and the abbreviations GCD, GCF and HCF are interchangeable. American textbooks tend to prefer GCF, British ones HCF, and computer science GCD. The distinct concept you should not confuse it with is the least common multiple, which is the smallest number both values divide into.

References

  • Euclid's Elements, Book VII, Propositions 1–2 (the Euclidean algorithm) — Translated by Sir Thomas L. Heath, Dover Publications
  • The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd ed., §4.5.2 — Addison-Wesley (Donald E. Knuth)
  • Concrete Mathematics: A Foundation for Computer Science, 2nd ed. — Addison-Wesley (Graham, Knuth and Patashnik)