Egyptian Fraction Calculator

An Egyptian fraction expresses a rational number as a sum of distinct unit fractions, each of the form 1/n. Ancient Egyptians wrote fractions this way for thousands of years, with the Rhind Mathematical Papyrus (c. 1550 BC) containing tables of Egyptian fraction expansions. Enter a fraction p/q where p is less than q and both are positive integers. The calculator uses the Fibonacci-Sylvester greedy algorithm: at each step, take the largest unit fraction 1/n that does not exceed the remaining value, where n = ceiling(q/p), subtract it, and repeat until nothing remains. For example, 2/5: ceiling(5/2) = 3, so 1/3 is the first term. The remainder is 2/5 - 1/3 = 1/15, which is already a unit fraction. So 2/5 = 1/3 + 1/15. The algorithm always terminates, but it sometimes produces large denominators; alternative decompositions may exist with fewer terms or smaller denominators. This calculator shows each greedy step and the final sum notation.

2/5 = 1/3 + 1/15
2

Greedy algorithm steps

StepRemaining fractionn = ceil(q/p)Unit fractionNew remainder

Greedy algorithm

Given p/q (with 0 < p < q):
n = ceiling(q / p)
Subtract: p/q - 1/n = (p*n - q) / (q*n)
Simplify remainder. Repeat until remainder = 0.
Result: p/q = 1/n1 + 1/n2 + ... (all distinct)

Examples from the Rhind Papyrus

FractionEgyptian fraction form
2/31/2 + 1/6
2/51/3 + 1/15
2/71/4 + 1/28
3/41/2 + 1/4
4/51/2 + 1/4 + 1/20

Egyptian fractions: frequently asked questions

What is an Egyptian fraction?

An Egyptian fraction is a representation of a rational number as a sum of distinct unit fractions (fractions of the form 1/n). Ancient Egyptians used this notation extensively, as evidenced by the Rhind Mathematical Papyrus from around 1550 BC. For example, 2/5 = 1/3 + 1/15, and 3/7 = 1/3 + 1/11 + 1/231.

What is the greedy algorithm for Egyptian fractions?

The Fibonacci-Sylvester greedy algorithm: given a fraction p/q, find the smallest unit fraction 1/n that is less than or equal to p/q (so n = ceiling(q/p)). Subtract 1/n from p/q. Repeat with the remainder until the fraction reaches 0. This always terminates for any rational number in (0,1).

Is every fraction between 0 and 1 expressible as an Egyptian fraction?

Yes. Every positive rational number less than 1 can be written as a sum of distinct unit fractions. The Erdos-Straus conjecture asks whether 4/n can always be expressed as a sum of three unit fractions; it has been verified for all n up to very large values but not yet proved in general.

Why did ancient Egyptians use unit fractions?

Ancient Egyptian mathematics used a positional-style notation for fractions but only naturally represented unit fractions. Most non-unit fractions were expressed as sums. The only exception was 2/3, which had its own special symbol. Tables in the Rhind Papyrus provided Egyptian fraction expansions for 2/n for odd n from 3 to 101.

What are the limitations of this calculator?

This calculator accepts fractions p/q where p is less than q (proper fractions) and both are positive integers, with q up to about 1,000. The greedy algorithm always finds a valid expansion, but it may not be the shortest or simplest one. Some fractions have multiple valid Egyptian fraction representations.

Sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.