Egyptian Fractions Calculator

Convert any fraction into a sum of distinct unit fractions using the ancient greedy algorithm — the same method used by Egyptian mathematicians over 3,500 years ago.

Enter a numerator and denominator to decompose the fraction into distinct unit fractions (1/n terms).

Egyptian Fractions Calculator
Convert any fraction into a sum of distinct unit fractions using the ancient greedy algorithm — the same method used by Egyptian mathematicians over 3,500 years ago.

About Egyptian fractions

An Egyptian fraction is a representation of a rational number as a sum of distinct unit fractions, where a unit fraction is a fraction of the form 1/n for a positive integer n. For example, 2/3 = 1/2 + 1/6, and 4/5 = 1/2 + 1/4 + 1/20. Ancient Egyptian mathematicians, working more than 3,500 years ago, exclusively used such representations. The Rhind Mathematical Papyrus (circa 1650 BCE) and the Moscow Mathematical Papyrus both contain extensive tables of Egyptian fraction decompositions that scribes used for practical calculations involving land, grain, and labor. The Egyptians wrote fractions using a special hieroglyphic symbol (an oval or mouth glyph called "ro") placed above the integer denominator, representing the unit fraction 1/n. They could only add such symbols together — they had no way to write fractions with numerators other than 1. This constraint drove the development of sophisticated decomposition tables and algorithms. Modern mathematicians have shown that every positive rational number less than 1 can be expressed as a finite sum of distinct unit fractions, so the Egyptian representation is always possible. The most well-known algorithm for computing Egyptian fractions is the greedy algorithm, also called the Fibonacci–Sylvester algorithm. It works as follows: given a fraction p/q, find the smallest integer n such that 1/n ≤ p/q (i.e., n = ⌈q/p⌉), subtract 1/n from p/q to get a new fraction, simplify it, and repeat until the remainder is itself a unit fraction. The greedy algorithm always terminates and always produces distinct unit fractions, though it does not always find the shortest or most elegant representation. For example, to decompose 2/3 using the greedy algorithm: ⌈3/2⌉ = 2, so subtract 1/2: 2/3 − 1/2 = 4/6 − 3/6 = 1/6. The result is 2/3 = 1/2 + 1/6. For 4/5: ⌈5/4⌉ = 2, subtract 1/2: 4/5 − 1/2 = 3/10. Then ⌈10/3⌉ = 4, subtract 1/4: 3/10 − 1/4 = 6/20 − 5/20 = 1/20. Result: 4/5 = 1/2 + 1/4 + 1/20. Egyptian fractions remain an active area of mathematical research. The Erdős–Straus conjecture (1948) states that 4/n can always be written as the sum of exactly three unit fractions — this has been verified for all n up to at least 10^14 but remains unproven in general. Questions about the minimum number of terms in an Egyptian fraction representation, the maximum denominator in the optimal representation, and efficient algorithms for finding short representations are all subjects of ongoing mathematical work. Beyond pure mathematics, Egyptian fraction representations have applications in fair division problems. Splitting a resource (like land, time, or money) into shares corresponding to unit fractions of the whole is straightforward and unambiguous. Egyptian fractions also appear in the analysis of certain combinatorial games and in number theory problems related to perfect numbers and harmonic series.

Egyptian fractions examples

Four representative fractions decomposed using the greedy algorithm with step-by-step traces.

FractionEgyptian FractionsNotes
2/31/2 + 1/6⌈3/2⌉ = 2 → subtract 1/2 → remainder 1/6. The classic 2-term decomposition. Appears in the Rhind Papyrus tables.
5/81/2 + 1/8⌈8/5⌉ = 2 → subtract 1/2 → remainder 5/8 − 4/8 = 1/8. Clean 2-term result with the greedy algorithm.
7/121/2 + 1/12⌈12/7⌉ = 2 → subtract 1/2 → 7/12 − 6/12 = 1/12. Another elegant 2-term representation.
4/51/2 + 1/4 + 1/20Three terms are needed. Step 1: 1/2. Step 2: 3/10 − 1/4 = 1/20. Result: 1/2 + 1/4 + 1/20 = 10/20 + 5/20 + 1/20 = 16/20 = 4/5 ✓.

How to use the Egyptian fractions calculator

  1. Enter the numerator (top number) of your fraction in the Numerator field. It must be a positive integer.
  2. Enter the denominator (bottom number) in the Denominator field. It must be a positive integer greater than the numerator.
  3. Click Convert to Egyptian Fractions. The result panel shows the decomposition as a sum of unit fractions, the verification that the sum equals the original, the greedy algorithm steps, and the total number of terms.
  4. Read the step-by-step trace to understand how the greedy algorithm subtracted each unit fraction in sequence.
  5. Click Reset Calculator to clear the inputs and try a different fraction.

Egyptian fractions calculator FAQ

What is an Egyptian fraction?
An Egyptian fraction is a representation of a rational number as a finite sum of distinct unit fractions — fractions of the form 1/n where n is a positive integer. For example, 3/4 = 1/2 + 1/4. Ancient Egyptians used this notation exclusively because their number system had no way to write fractions with numerators other than 1.
Does every fraction have an Egyptian fraction representation?
Yes. Every positive rational number can be expressed as a finite sum of distinct unit fractions. This was proven using the greedy algorithm, which always terminates after a finite number of steps. The representation is not unique — most fractions have multiple valid Egyptian fraction decompositions with different numbers of terms.
What is the greedy algorithm for Egyptian fractions?
The greedy algorithm, also called the Fibonacci–Sylvester algorithm, works by repeatedly subtracting the largest unit fraction that does not exceed the remaining value. For fraction p/q, the first term is 1/⌈q/p⌉ (where ⌈⌉ denotes ceiling). The remainder is simplified and the process repeats until the remainder is already a unit fraction.
Does the greedy algorithm always find the shortest representation?
No. The greedy algorithm always terminates and produces a valid representation, but it does not always find the one with the fewest terms. For example, the greedy algorithm gives 5/121 = 1/25 + 1/757 + ..., while a shorter alternative exists. Finding the minimum-term representation is computationally hard for large numerators.
Can the numerator be larger than the denominator?
The classic Egyptian fraction representation applies to proper fractions (numerator < denominator). If the fraction is greater than 1, you can first extract the integer part and represent the fractional remainder as an Egyptian fraction. This calculator handles proper fractions with numerator less than denominator.
What is the Erdős–Straus conjecture?
The Erdős–Straus conjecture (1948) states that for every integer n ≥ 2, the fraction 4/n can be written as the sum of exactly three unit fractions: 4/n = 1/a + 1/b + 1/c. This has been verified computationally for all n up to at least 10^14, but a general proof remains one of the outstanding unsolved problems in number theory.