Egyptian Fractions Calculator

Enter a fraction's numerator and denominator to expand it into a sum of distinct unit fractions (like 5/6 = 1/2 + 1/3) using the greedy Egyptian fraction algorithm.

Quick Facts

Definition
Sum of distinct unit fractions
Every term has numerator 1 (like 1/2 or 1/15), and no denominator repeats.
Greedy step formula
Subtract 1/⌈d/n⌉ each round
⌈d/n⌉ means d divided by n, rounded up to the next whole number.
Termination guarantee
Numerator strictly shrinks
Fibonacci proved in 1202 that this always finishes in finitely many steps.

Your Results

Calculated
Egyptian Fraction Expansion
-
Sum of distinct unit fractions
Unit Fractions Used
-
Number of terms in the sum
Largest Denominator
-
Denominator of the final term
Simplified Fraction
-
n/d in lowest terms

Ready

Enter a numerator and denominator, then press Calculate.

Formula and Method for the Egyptian Fraction Calculator

An Egyptian fraction is a way of writing a positive rational number as a sum of distinct unit fractions — fractions with a numerator of 1, such as 1/2, 1/3, or 1/15 — with no denominator repeated. The method dates back to the Rhind Mathematical Papyrus (c. 1650 BCE), where ancient Egyptian scribes recorded fractions almost exclusively this way. This calculator takes a fraction n/d and expands it into a sum of distinct unit fractions using the greedy algorithm, also called the Fibonacci–Sylvester algorithm after Leonardo Fibonacci, who proved in his 1202 book Liber Abaci that it always produces a finite expansion.

How the greedy algorithm works

Starting from a proper fraction n/d (with 0 < n < d), the greedy method repeatedly subtracts the largest unit fraction that does not exceed what remains. At each step it takes the unit fraction 1/⌈d/n⌉, where ⌈d/n⌉ is d divided by n rounded up to the next whole number, and subtracts it from the current remainder. For example, 5/6 becomes 1/2 first (since ⌈6/5⌉ = 2, because 6/5 = 1.2); subtracting leaves 5/6 − 1/2 = 1/3, which is already a unit fraction, so 5/6 = 1/2 + 1/3. Because the numerator of the remainder is always smaller after each step, the process is guaranteed to terminate. If the input fraction is improper (numerator ≥ denominator), the calculator first separates out the whole-number part and expands only the proper-fraction remainder.

Common mistakes

  • Repeating a denominator: 1/3 + 1/3 is not a valid Egyptian fraction — denominators must all be distinct; use 2/3 = 1/2 + 1/6 instead.
  • Assuming the expansion is unique: the greedy algorithm produces one valid decomposition, but the same fraction can often be written with fewer terms or smaller denominators using other methods.
  • Flipping the ratio: the step formula is ⌈d/n⌉ (denominator over numerator), not ⌈n/d⌉ — mixing these up gives a fraction greater than 1 instead of a valid unit fraction.

Why denominators can grow so fast

Because each step's denominator depends on the previous remainder, fractions close to 1 — such as 2/3 or 4/5 — can produce rapidly growing denominators under the greedy method, a pattern related to Sylvester's sequence (2, 3, 7, 43, 1807, ...). This calculator caps the number of terms it will compute so an extremely fast-growing expansion doesn't stall your browser; if a result is marked as truncated, try raising the maximum terms slightly, or note that the greedy method is not always the most practical representation for that fraction.

Frequently Asked Questions

What is an Egyptian fraction?
An Egyptian fraction is a representation of a positive rational number as a sum of distinct unit fractions (fractions with numerator 1), such as 5/6 = 1/2 + 1/3. Ancient Egyptian scribes used only unit fractions (plus 2/3) in texts like the Rhind Mathematical Papyrus, so any other fraction had to be broken down this way.
How does the greedy (Fibonacci–Sylvester) algorithm find the expansion?
At each step it takes the largest unit fraction 1/⌈d/n⌉ that is less than or equal to the remaining fraction n/d, subtracts it, and repeats with what's left. Because the numerator of the remainder strictly decreases every step, the process always terminates in a finite number of terms — a result proved by Fibonacci in 1202.
Is the Egyptian fraction expansion of a number unique?
No. The greedy algorithm always finds a valid expansion, but it is rarely the shortest one and can produce very large denominators. For example, the greedy method expands 4/17 into 1/5 + 1/29 + 1/1233 + 1/3039345, while a shorter alternative exists: 4/17 = 1/6 + 1/17 + 1/102. Both are valid Egyptian fractions for the same value.
Why does the calculator limit the number of terms?
Some fractions, particularly ones just below 1, produce denominators that grow roughly double-exponentially with each term under the greedy method. Capping the term count keeps the calculation fast and the output readable; a truncated result means the exact sum wasn't fully reached within that many terms.