Skip to content
Math

Egyptian Fractions Calculator

Enter a numerator and denominator to decompose your fraction into a sum of distinct unit fractions the way ancient Egyptian scribes wrote them. Choose the greedy algorithm, the splitting method, or let the calculator pick the most compact result. The step-by-step panel shows every subtraction so you can follow the full derivation.

Your details

The top number of your fraction. Must be a positive integer.
The bottom number of your fraction. Must be a positive integer greater than 0.
Greedy takes the largest possible unit fraction at each step. Splitting repeatedly peels off 1/denominator. Best tries all methods and returns the shortest result.
Egyptian fraction expansion
1/2 + 1/4

The fraction written as a sum of distinct unit fractions

Number of terms2
Largest denominator4
Method usedGreedy (Fibonacci-Sylvester)
Reduced input3/4
Number of terms2
Largest denominator4

3/4 = 1/2 + 1/4

  • Your fraction 3/4 decomposes into 2 distinct unit fractions.
  • The largest denominator in the expansion is 4, which is quite compact.
  • A two-term expansion is among the most compact possible; the Rhind Papyrus used two-term forms frequently because they were easiest to work with in practice.

Next stepExperiment with the "Best (fewest terms)" algorithm to compare approaches, or try fractions like 2/7 and 3/11 that appear in the historical Rhind Papyrus tables.

Algorithm comparison for 3/4

AlgorithmTermsMax denominatorExpansion
Greedy241/2 + 1/4
Splitting241/4 + 1/2
Best241/2 + 1/4

Fewer terms and a smaller maximum denominator generally indicate a more compact representation.

Formula

Egyptianfractiondecompositionusesthegreedyalgorithm:ateachstep,takethelargestunitfraction1/ceil(q/p)thatdoesnotexceedtheremainingfractionp/q,subtractit,thenrepeatwiththeremainder.Theprocessterminatesbecausethenumeratorstrictlydecreasesateachstep.Egyptian fraction decomposition uses the greedy algorithm: at each step, take the largest unit fraction 1/ceil(q/p) that does not exceed the remaining fraction p/q, subtract it, then repeat with the remainder. The process terminates because the numerator strictly decreases at each step.

Worked example

Decompose 3/4 using the greedy algorithm. Step 1: ceil(4/3) = 2, so take 1/2. Remainder: 3/4 - 1/2 = 1/4. Step 2: 1/4 is already a unit fraction. Result: 3/4 = 1/2 + 1/4.

What are Egyptian fractions?

Egyptian fractions are representations of rational numbers as sums of distinct unit fractions - fractions whose numerator is 1. For example, ancient Egyptian scribes wrote 3/4 as 1/2 + 1/4 rather than as a single fraction. This notation appears in some of the oldest mathematical documents in existence, including the Rhind Mathematical Papyrus (c. 1650 BCE) and the Moscow Mathematical Papyrus. The system required that no unit fraction be repeated, so 2/3 could not be written as 1/3 + 1/3 but was instead expressed as 1/2 + 1/6. This constraint made arithmetic challenging but also produced elegant identities that mathematicians still study today.

How the greedy algorithm works

The most common method for computing Egyptian fractions is the greedy algorithm, also called the Fibonacci-Sylvester algorithm after Fibonacci, who described it in his 1202 Liber Abaci, and James Joseph Sylvester, who proved it always terminates. Given a fraction p/q, you first find the largest unit fraction that does not exceed it: that is 1/n where n = ceil(q/p), the ceiling of the denominator divided by the numerator. You then subtract this unit fraction and repeat with the remainder. Because each step strictly reduces the numerator of the remaining fraction, the process is guaranteed to terminate in a finite number of steps. The steps panel in this calculator shows every subtraction in detail so you can trace the full derivation.

Other algorithms and why they matter

The greedy algorithm is simple and always terminates, but it does not always produce the shortest or most elegant expansion. For the fraction 5/121, for instance, the greedy algorithm yields 1/25 + 1/757 + 1/763309 + 1/873960180913 + 1/1527612795642093418846225, a five-term expression with a spectacularly large last denominator. The identity 5/121 = 1/33 + 1/121 + 1/363 gives a much nicer three-term result. The splitting method is an alternative that repeatedly peels off 1/denominator at each step; it often produces more terms but smaller denominators. The "Best" option in this calculator tries both approaches and returns whichever gives fewer terms, with ties broken by the smallest maximum denominator.

Applications and open problems

Egyptian fractions are far more than a historical curiosity. They appear in number theory, combinatorics, and even computer science. The Erdos-Straus Conjecture (1948), still unproven, asserts that for every integer n >= 2, the fraction 4/n can be expressed as a sum of exactly three unit fractions. The Erdos-Grahams problem asks whether every set of integers whose reciprocals sum to at least 1 contains a finite subset whose reciprocals sum to exactly 1. These questions connect Egyptian fractions to deep questions about prime numbers and integer partitions. In practical terms, fractions of this form are useful in scheduling problems and in dividing resources fairly when only whole-unit allocations are permitted.

Historical examples from the Rhind Mathematical Papyrus (c. 1650 BCE)

FractionEgyptian fraction expansionTermsNotes
2/31/2 + 1/62Oldest known example
2/51/3 + 1/152Two-term form
2/71/4 + 1/282Rhind table entry
2/91/6 + 1/182Rhind table entry
2/111/6 + 1/662Rhind table entry
2/131/8 + 1/52 + 1/1043Three-term form
3/41/2 + 1/42Common classical example
4/51/2 + 1/4 + 1/203Greedy result
5/61/2 + 1/32Simple two-term
7/81/2 + 1/4 + 1/83Powers of two

The Rhind Papyrus contains a table of 2/n fractions for odd n from 5 to 101. These are some of the most studied Egyptian fraction decompositions.

Frequently asked questions

Why did ancient Egyptians use unit fractions?

Historians believe the notation arose from the practical needs of land surveying, grain distribution, and tax collection, activities that required fair division of goods. Writing fractions as sums of distinct unit fractions made the proportions concrete: 1/2 of a loaf plus 1/4 of a loaf is physically easier to reason about than 3/4 of a loaf in the abstract. The Eye of Horus symbol in Egyptian hieroglyphics encoded fractions 1/2, 1/4, 1/8, 1/16, 1/32, and 1/64, all powers of two that sum to 63/64. The scribes who compiled the Rhind Papyrus devoted an entire table to the expansion of 2/n fractions, showing how systematically they approached the problem.

Can every fraction be expressed as an Egyptian fraction?

Yes, every positive rational number p/q can be expressed as a finite sum of distinct unit fractions. This was proved rigorously in the 19th century, though the ancient Egyptians knew it empirically. The greedy algorithm provides a constructive proof: the numerator of the remainder strictly decreases at each step, so the process must terminate in at most p steps.

Is the Egyptian fraction expansion unique?

No. Most fractions have many different valid expansions. For example, 2/3 can be written as 1/2 + 1/6, but also as 1/2 + 1/7 + 1/42, or 1/3 + 1/3 - wait, that repeats 1/3, so it is not a valid Egyptian fraction. The requirement that all unit fractions be distinct still leaves enormous freedom. Different algorithms produce different, equally valid expansions, and there is no unique "canonical" form. The Rhind Papyrus scribes may have chosen specific expansions for the 2/n table based on practical criteria such as avoiding large denominators.

What is the Erdos-Straus Conjecture?

The Erdos-Straus Conjecture, posed by Paul Erdos and Ernst Straus in 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 for positive integers a, b, c. The conjecture has been verified computationally for all n up to at least 10^14, but no general proof exists. It is one of the most famous open problems that is easy to state but extremely hard to prove.

Why does the greedy algorithm sometimes produce very large denominators?

The greedy algorithm chooses the largest safe unit fraction at every step without looking ahead, which can create a small remainder that requires an enormous denominator in the next step. The classic example is 5/121, where the greedy choice at step four produces a denominator with 25 digits. Alternative algorithms like the splitting method or hand-crafted identities can avoid this by making slightly sub-optimal early choices that lead to much nicer later terms. The "Best (fewest terms)" option in this calculator compares greedy and splitting results to mitigate this.

How do I verify that an Egyptian fraction expansion is correct?

Add all the unit fractions using a common denominator. For example, to check 3/4 = 1/2 + 1/4, the LCM of 2 and 4 is 4, giving 2/4 + 1/4 = 3/4. For larger expansions, multiplying through by the LCM of all denominators gives an integer equation you can verify by arithmetic. The step-by-step panel in this calculator shows a running remainder after each subtraction, making it easy to spot any error.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…