Logo

MonoCalc

/

Egyptian Fraction Calculator

Math
A positive whole number, up to 18 digits.
Improper fractions are fine — 7/3 becomes 2 + 1/3.

Try:

Subtracts the largest unit fraction that still fits, over and over. Always finishes and always yields distinct denominators, but they can grow enormous.

Safety cap between 1 and 50.
Used only for the decimal preview, 0 to 10.

Egyptian fraction of 5/6 (Greedy (Fibonacci–Sylvester))

5/6 = 1/2 + 1/3

2 unit fractions= 0.833All denominators distinctLargest 1/3
Verified

1/2 + 1/3 = 5/6

How the value is carved up

1/2

1/3

#Unit fractionDecimalShare of the value
11/20.50000000060.00%
21/30.33333333340.00%

Step-by-step work

StepRemainingSubtractNew remainder
15/61/21/3
21/31/30

About This Tool

Egyptian Fraction Calculator – Sums of Distinct Unit Fractions

An Egyptian fraction writes a positive rational number as a sum of distinct unit fractions — fractions whose numerator is 1. So 5/6 = 1/2 + 1/3 and 4/13 = 1/4 + 1/18 + 1/468. This calculator takes a fraction or a decimal and produces that decomposition four different ways, showing every subtraction along the route and proving the terms add back up to what you started with.

Why Ancient Scribes Wrote Fractions This Way

The Rhind Mathematical Papyrus, copied around 1550 BCE from an older document, opens with a table expressing 2/n for every odd n from 3 to 101 as sums of unit fractions. Egyptian arithmetic had no general notation for a fraction such as three sevenths — apart from a dedicated glyph for 2/3, every quantity had to be a sum of parts. The system was not merely a quirk: unit fractions make dividing goods among people concrete, because 5/6 of a loaf each is literally half a loaf plus a third of a loaf.

The Greedy (Fibonacci–Sylvester) Algorithm

Fibonacci described the standard method in the Liber Abaci of 1202, and Sylvester analysed it in 1880. Given a remaining value p/q, take the largest unit fraction that still fits — that is 1/a with a = ceil(q/p) — subtract it, and repeat on the reduced remainder (p·a − q)/(q·a). The algorithm is guaranteed to finish because the numerator of the remainder strictly decreases every round: p·a − q is always less than p. A strictly falling sequence of positive whole numbers must hit zero.

Short Is Not the Same as Terminating

Termination says nothing about elegance. The famous case is 4/17, where greedy produces 1/5 + 1/29 + 1/1233 + 1/3039345 while a search finds the much tidier 1/5 + 1/30 + 1/510. Denominators can roughly square at each step, so a handful of terms can push a denominator past a hundred digits. The Minimal Terms method runs a bounded exhaustive search instead, using two bounds to keep it fast: the next denominator must be at least q/p, and with k terms left it cannot exceed k·q/p.

The Splitting Identity

The binary or splitting method starts from the naive sum — 2/5 as 1/5 + 1/5 — and repairs the repetition with the identity 1/n = 1/(n+1) + 1/(n(n+1)), giving 1/5 + 1/6 + 1/30. Turn on Allow Repeated Denominators to see the naive starting point before any splitting happens. The method is a lovely demonstration on small numerators but grows quickly on large ones, which is precisely why the greedy approach became the classical choice.

Improper fractions and decimals both work
Enter 7/3 and the whole part is separated first, giving 2 + 1/3. Enter a decimal such as 0.75 and it is converted to the exact reduced fraction 3/4 before decomposing, producing 1/2 + 1/4.

Erdős–Straus and an Open Problem

In 1948 Paul Erdős and Ernst Straus conjectured that every fraction 4/n with n ≥ 2 is a sum of three unit fractions. Even values of n and values with n ≡ 3 (mod 4) fall out of simple identities — for n = 7 you get 4/7 = 1/2 + 1/15 + 1/210. The residue class n ≡ 1 (mod 4) has resisted every attempt at proof for more than seventy-five years, even though computer searches have confirmed it far past 10^17. Erdős–Straus mode switches itself on whenever your input can be rewritten in the 4/n shape.

Exact Arithmetic and Reading the Output

Every calculation runs on big-integer arithmetic, so nothing is rounded and the tool can confirm that the terms sum back to your input before displaying them. The proportional bar shows how much of the value each unit fraction covers, the step table traces the running remainder, and Max Terms stops slow-converging expansions before they run away. If a decomposition stops early you will see the leftover fraction reported instead of a false equals sign — raise the cap, or switch methods, and the calculator finishes the job.

Frequently Asked Questions

Is the Egyptian Fraction Calculator free?

Yes, Egyptian Fraction Calculator is totally free :)

Can I use the Egyptian Fraction Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Egyptian Fraction Calculator?

Yes, any data related to Egyptian Fraction Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this Egyptian fraction calculator work?

The default greedy (Fibonacci–Sylvester) method repeatedly subtracts the largest unit fraction that still fits: for a remaining value p/q it takes 1/a with a = ⌈q/p⌉, then continues with the reduced remainder (p·a − q)/(q·a) until nothing is left. The calculator also offers the binary/splitting identity, an exhaustive minimal-term search and a dedicated Erdős–Straus mode for values of the form 4/n.

Why does the greedy algorithm always terminate?

Because the numerator of the remainder strictly decreases at every step. Subtracting 1/⌈q/p⌉ from p/q leaves (p·a − q)/(q·a), and since a is the smallest integer with 1/a ≤ p/q, the new numerator p·a − q is always smaller than p. A strictly decreasing sequence of positive whole numbers must reach zero, so the expansion cannot run forever.

Does the greedy method give the fewest possible unit fractions?

No. Greedy is guaranteed to finish but not to be short. The classic counter-example is 4/17: greedy returns 1/5 + 1/29 + 1/1233 + 1/3039345, while a search finds the far tidier 1/5 + 1/30 + 1/510. Switch to the Minimal Terms method to run a bounded exhaustive search for the shortest distinct decomposition.

What is the Erdős–Straus conjecture?

It states that every fraction 4/n with n ≥ 2 can be written as a sum of three unit fractions. Even n and n ≡ 3 (mod 4) have simple closed-form identities, but n ≡ 1 (mod 4) has resisted proof since 1948 even though it has been verified by computer far beyond 10^17. Erdős–Straus mode becomes available whenever your input can be rewritten as 4/n.

Can I enter improper fractions or decimals?

Yes. An improper fraction such as 7/3 has its whole part separated first and is reported as 2 + 1/3, which is how Egyptian scribes wrote such quantities. A decimal is converted to its exact reduced fraction before decomposing, so 0.75 becomes 3/4 and then 1/2 + 1/4. Recurring decimals typed as terminating values, such as 0.8333 for 5/6, decompose as the exact terminating fraction you typed rather than the recurring one.

How accurate are the very large denominators shown?

Every calculation uses exact big-integer arithmetic, so no digit is ever rounded away — the tool verifies that the terms sum back to your input before displaying them. Greedy denominators can roughly square at each step, so numbers with dozens of digits are abbreviated on screen while the full value stays in the copy and download exports.