An Egyptian fraction is a sum of distinct unit fractions. The greedy method, which this calculator uses, subtracts the largest unit fraction that fits in what is left at each step. To write a fraction greater than 1, first split off its whole part.
Decomposing 4/13 with the greedy method
Each step has two parts: choosing the denominator and subtracting. The denominator comes from dividing the remainder’s denominator by its numerator and rounding up.
Worked example: from fraction to unit fractions
Write 4/13 as a sum of distinct unit fractions.
- First term: 13 ÷ 4 = 3.25, which rounds up to 4. Take the unit fraction with denominator 4; a larger one no longer fits.
- First remainder: 4/13 − 1/4 = 16/52 − 13/52 = 3/52.
- Second term: 52 ÷ 3 = 17.33…, which rounds up to 18. The unit fraction is 1/18.
- Second remainder: 3/52 − 1/18 = 27/468 − 26/468 = 1/468.
- Third term: the remainder is already a unit fraction, so it is added as it is and nothing is left.
Result: 4/13 = 1/4 + 1/18 + 1/468.
Check: 1/4 + 1/18 = 11/36, and 4/13 − 11/36 = 144/468 − 143/468 = 1/468, exactly the last term.
The denominators 4, 18 and 468 grow at each step, so no term repeats, and the process ends when the remainder is 0.
What the method gives for different fractions
| Fraction | Greedy decomposition | What to notice |
|---|---|---|
| 2/13 | 1/7 + 1/91 | Two terms, and the second denominator is 13 times the first |
| 7/15 | 1/3 + 1/8 + 1/120 | Three terms, increasing denominators |
| 3/7 | 1/3 + 1/11 + 1/231 | Three terms, and the last denominator is 11 times 21 |
The table shows that the number of terms does not follow the size of the fraction: 2/13 needs two, while 3/7 and 7/15 need three.
How to read an incomplete result
When the term limit cuts the process off before it reaches 0, the sum you get is not yet your fraction. Add the exact remainder shown below it and you recover the input value. If you set a low limit on purpose, you can follow the method term by term and compare each remainder with your own work by hand.
To add terms with different denominators you need a common denominator, and equivalent fractions help there. If you want another way to write a rational number as a chain of operations, continued fractions express it with nested reciprocals. The guide to unit fractions explains how to compare and order them, and the article on the history of fractions covers their origin.
Sources
English Wikipedia, article Egyptian fraction: defines an Egyptian fraction as a finite sum of distinct unit fractions, notes that Fibonacci’s greedy algorithm is sometimes attributed to Sylvester, shows that a number can have several expansions, and gives 5/121 as a case where the greedy expansion is longer than 1/33 + 1/121 + 1/363 (accessed October 17, 2026).
Frequently asked questions
Is the Egyptian fraction decomposition unique?
No. The same fraction can be written as several sums of distinct unit fractions. For example, 5/6 = 1/2 + 1/3 and also 5/6 = 1/2 + 1/4 + 1/12, because 6/12 + 3/12 + 1/12 = 10/12. The calculator always applies the greedy method, so the same input gives the same result.
Why does the greedy method always end?
At each step the new numerator, a·n − d, is a nonnegative integer smaller than the previous numerator a. A sequence of integers that keeps going down has to reach 0, and that happens in at most a steps. In the worked example the numerators are 4, 3, 1 and 0, and the process stops.
Why are they called Egyptian fractions?
Because ancient Egypt wrote fractions as sums of unit fractions. The Ahmes papyrus, also called the Rhind papyrus, from around 1650 BC and kept in the British Museum, is one of the documents that shows this. The background is in the history of fractions. The greedy method is also called Sylvester's algorithm.
What is the shortest decomposition of a fraction?
There is no simple formula, and the greedy method does not always give it. For 5/121 it gives five terms and the last denominator has 25 digits, while 5/121 = 1/33 + 1/121 + 1/363 uses three: 11/363 + 3/363 + 1/363 = 15/363 = 5/121. To look for a shorter one you have to try other combinations.