Egyptian Fraction Calculator

Fraction

Egyptian fraction expansion1/3 + 1/11 + 1/231
Number of unit fractions3
Largest denominator231
First unit fraction1/3
How this was calculated
  1. The greedy algorithm repeatedly takes the largest unit fraction that does not exceed what is left, then continues with the remainder.
  2. For 3/7 the first unit fraction is 1/3, and the same step is repeated on each remainder until nothing is left.
  3. The expansion is 1/3 + 1/11 + 1/231.
  4. That is 3 unit fractions, and the largest denominator is 231; greedy expansions always terminate for a proper fraction, though they can grow long.

This Egyptian fraction calculator rewrites an ordinary fraction as a sum of distinct unit fractions — fractions with 1 on top, such as 1/3 or 1/11 — the way fractions were recorded in ancient Egypt. Enter a fraction and the page gives you its Egyptian fraction expansion, along with the step-by-step workings that produce it. For example, 3/7 expands to 1/3 + 1/11 + 1/231, three unit fractions, while two thirds expands to 1/2 + 1/6 and four fifths to 1/2 + 1/4 + 1/20.

The calculator uses the greedy algorithm, which takes the largest unit fraction not exceeding what remains and then repeats the process on the remainder; for a proper fraction it always terminates. That guaranteed termination is why the greedy method is the accepted standard for this kind of calculation. It is worth knowing that greedy expansions are not always the shortest possible, and their largest denominators can grow very large. This page shows the formula, the step-by-step workings, worked examples and sources so you can check every result yourself.

Worked examples

Three sevenths

(3 · 7)

Egyptian fraction expansion1/3 + 1/11 + 1/231
Number of unit fractions3
Largest denominator231
First unit fraction1/3

Two thirds

(2 · 3)

Egyptian fraction expansion1/2 + 1/6
Number of unit fractions2
Largest denominator6
First unit fraction1/2

Four fifths

(4 · 5)

Egyptian fraction expansion1/2 + 1/4 + 1/20
Number of unit fractions3
Largest denominator20
First unit fraction1/2

Fractions the Egyptian way

Long before fractions were written with a bar and two numbers, Egyptian scribes recorded parts of a whole in a very different style. An Egyptian fraction writes a fraction as a sum of distinct unit fractions — fractions with 1 on top, such as 1/2, 1/3 or 1/11 — and this is how fractions were recorded in ancient Egypt. A value like four fifths was not jotted down as a single symbol with a denominator of 5. It was broken into a chain of separate unit fractions added together: 1/2 + 1/4 + 1/20.

The system had one notable exception. Two thirds was important enough to earn its own special sign rather than being forced into the unit-fraction pattern. Even so, when two thirds had to be expressed as a sum, it could be written as 1/2 + 1/6. That small allowance aside, the rule was strict: each unit fraction in a sum had a different denominator. Scribes avoided repeating a denominator, so you would not see 1/5 + 1/5 as a way of writing two fifths. Distinct denominators kept each expression unambiguous and matched the way the notation was built.

Modern readers often wonder how a scribe arrived at a particular sum. One reliable method is the greedy algorithm: take the largest unit fraction that does not exceed what remains, subtract it, and repeat the process on the remainder. For a proper fraction the procedure always terminates, so it always produces a finished expansion. Applied to 3/7, the greedy algorithm yields 1/3 + 1/11 + 1/231 — three unit fractions in all. That last denominator, 231, hints at a practical quirk of the method: the numbers can climb quickly.

The greedy approach is dependable, but it is not a guarantee of elegance. Greedy expansions are not always the shortest possible, so a sum with fewer or smaller denominators may exist for the same value. Their largest denominators can grow very large, as the 3/7 example shows. An egyptian fraction calculator is useful precisely here: it performs the repeated subtraction for you and lays out the resulting unit fractions, so you can see how a single fraction unfolds into a sum of distinct parts without working through every step by hand.

The appeal of the Egyptian style is that it turns one fraction into a small story of pieces — halves, thirds, elevenths — each with a numerator of one. Whether you are checking a textbook example or exploring how far the denominators can stretch, the method rewards patience and a little arithmetic.

Two thirds had its own special sign in ancient Egypt, yet it can also be written as 1/2 + 1/6.

The greedy algorithm step by step

The greedy algorithm is the standard method behind most egyptian fraction calculator tools, and it is easier to follow than its name suggests. It takes the largest unit fraction not exceeding what remains, then repeats on the remainder; it always terminates for a proper fraction. In other words, at every step you ask: what is the biggest fraction of the form 1/n that still fits inside the amount left to express? You subtract it, and you start again with whatever is left over. Because each step removes a distinct unit fraction and the remainder keeps shrinking, the process stops rather than running forever.

The worked example of 3/7 shows the loop in action. The largest unit fraction not exceeding 3/7 is 1/3, since 1/3 is smaller than 3/7 but 1/2 is larger. Subtracting 1/3 from 3/7 leaves a remainder of 2/21. On that remainder the same rule applies: the largest unit fraction not exceeding 2/21 is 1/11, because 1/11 is just under 2/21 while 1/10 is too big. Subtracting 1/11 from 2/21 leaves 1/231, which is already a unit fraction, so the process ends. The result is 3/7 = 1/3 + 1/11 + 1/231, three unit fractions in all.

The same steps run on other proper fractions. Two thirds expands to 1/2 + 1/6: the largest unit fraction not exceeding 2/3 is 1/2, and the remainder is 1/6, itself a unit fraction, so two terms finish the job. Four fifths expands to 1/2 + 1/4 + 1/20: 1/2 is taken first, the remainder is then handled by 1/4, and the final remainder of 1/20 closes the expansion. In each case the pattern is identical — biggest fitting unit fraction, subtract, repeat — which is why the method is so often used to demonstrate how an Egyptian fraction is built.

Two cautions are worth keeping in mind when you read a result from any egyptian fraction calculator. Greedy expansions are not always the shortest possible, so a fraction may have a shorter representation than the greedy method produces. And their largest denominators can grow very large, especially as the starting fraction becomes more awkward. The expansions above stay modest, but that is not a guarantee for every fraction you might enter.

FractionEgyptian fraction expansionNumber of unit fractions
3/71/3 + 1/11 + 1/2313
2/31/2 + 1/62
4/51/2 + 1/4 + 1/203
Greedy expansions are not always the shortest possible, and their largest denominators can grow very large.

Greedy is not always shortest

Run a fraction through an egyptian fraction calculator and you will usually see the greedy method at work. It takes the largest unit fraction not exceeding what remains, then repeats on the remainder, and it always terminates for a proper fraction. The results are correct, but correct is not the same as compact. Greedy expansions are not always the shortest possible, and that gap is worth understanding before you assume the first answer you get is the best one.

The worked example makes the point. Under the greedy rule, 3/7 expands to 1/3 + 1/11 + 1/231 — three unit fractions, all distinct, summing exactly to 3/7. Nothing is wrong with that. But the length of an expansion is a separate question from its correctness, and shorter expansions can exist for the same fraction. A greedy calculator is answering 'what does this rule produce?' rather than 'what is the fewest unit fractions that work?'

Greedy also has a habit of producing awkwardly large denominators. Because each step takes the biggest unit fraction that still fits, the remainder shrinks quickly but the next denominator can jump far beyond the ones before it. In the 3/7 case that shows up as the 231 at the end. Other fractions behave more gently: two thirds expands to 1/2 + 1/6, and four fifths to 1/2 + 1/4 + 1/20. The size of the largest denominator depends heavily on the fraction you start with, so a long tail is a property of the method, not a sign that you made a mistake.

Finding a shorter expansion is a different kind of task. It is a search problem: you are looking for a set of distinct unit fractions that adds up to the target, and you want the smallest set you can find. The greedy answer is a useful starting point and a guaranteed ceiling on how bad things can get, but it is not a proof that nothing shorter exists. Treat the two jobs separately — one is applying a rule, the other is solving a puzzle.

This matters most when you care about the form of the answer rather than just a valid one. If you are checking homework, the greedy result is usually what is expected. If you are comparing representations or hunting for elegance, keep looking past the first output.

  • Greedy: take the largest unit fraction not exceeding the remainder, then repeat; it always terminates for a proper fraction.
  • Greedy is reliable but not guaranteed to be the shortest expansion for a given fraction.
  • Large denominators can appear late in a greedy expansion — 3/7 ends in 1/231.
  • Shorter expansions, when they exist, are found by search, not by the greedy rule alone.
A valid expansion and a short expansion are two different goals. The greedy method delivers the first; the second takes extra work.

Where Egyptian fractions still turn up

Egyptian fractions began as a practical notation, but they have outlived the civilization that used them. Today they survive mainly in number theory problems, fair division puzzles, and the unit-fraction series that fill textbook exercises. A good egyptian fraction calculator lets you explore those settings without doing the long division by hand, and it makes the underlying rules easier to see.

In number theory, an Egyptian fraction writes a fraction as a sum of distinct unit fractions, the way fractions were recorded in ancient Egypt. That definition sounds simple, but it opens hard questions. Which fractions can be written with exactly two unit fractions? Which need three? How large can the denominators get? The greedy algorithm gives one standard way in: it takes the largest unit fraction not exceeding what remains, then repeats on the remainder, and it always terminates for a proper fraction. The catch is that greedy answers are not always the shortest possible, and their largest denominators can grow very large, so comparing greedy results with shorter expansions is a common exercise.

Worked examples make the point. The fraction 3/7 expands to 1/3 + 1/11 + 1/231, three unit fractions, with a final denominator in the hundreds. Two thirds expands to 1/2 + 1/6, and four fifths to 1/2 + 1/4 + 1/20. These small cases are the ones students usually meet first, and they show both the appeal and the awkwardness of the form: the pieces are simple, but the last denominator can jump.

Fair division is the other natural home. Splitting a set of items or a quantity into distinct unit shares has a long history in puzzles about dividing bread, land, or inheritance, and Egyptian fractions give a tidy way to describe such splits. The same idea appears in textbook exercises on series of unit fractions, where students add, compare, and search for alternative decompositions. In all these settings the arithmetic is the same, which is why a calculator is useful: it handles the repeated subtraction and leaves the reasoning to you.

Remember: greedy expansions are not always the shortest possible, and their largest denominators can grow very large.

FAQs

What is an Egyptian fraction?

An Egyptian fraction is a sum of distinct unit fractions that adds up to the fraction you start with. A unit fraction has a numerator of one, such as 1/3 or 1/11. The unit fractions in the sum must be different from one another, so you would not repeat the same fraction twice.

How does the greedy algorithm work?

The greedy algorithm takes the largest unit fraction that does not exceed the remainder, subtracts it, and repeats until nothing is left. Each step works on what remains after the earlier subtractions. Because every chosen fraction stays at or below the remainder, the running total never passes the original fraction.

What is 3/7 as an Egyptian fraction?

The greedy expansion of 3/7 is 1/3 + 1/11 + 1/231. The algorithm first picks 1/3, the largest unit fraction not exceeding 3/7. Subtracting leaves a remainder that is then matched with 1/11, and the final piece is 1/231. All three unit fractions are distinct.

Does the greedy method always finish?

Yes, for any proper fraction it terminates, though the denominators can become very large. The process always reaches a point where nothing is left, so the expansion is complete. The tradeoff is size: some fractions produce denominators far larger than the starting fraction would suggest.

Is the greedy expansion the only one?

No. Most fractions have many Egyptian expansions, and the greedy one is simply the easiest to compute. Other methods can produce different sets of distinct unit fractions that add up to the same value. The greedy result is one valid answer among several, not the only possible one.

Why did Egyptians write fractions this way?

Their notation was built on unit fractions, with tables such as the Rhind papyrus giving expansions for everyday division problems. Writing a fraction as a sum of unit fractions fit that system. The papyrus tables let scribes look up expansions instead of working them out from scratch each time.

Sources

Related calculators

Fraction Calculator
Add, subtract, multiply and divide two fractions, with the answer simplified, as a mixed number, a decimal and a percentage.
Continued Fraction Calculator
Expand a decimal into its continued fraction and read off the convergents — the best possible rational approximations, from 22/7 up to the legendary 355/113 for pi.
Equivalent Fractions Calculator
Generate equivalent fractions, test whether two fractions are equivalent by cross-multiplication, or find the missing numerator in a proportion.