Egyptian Fraction Calculator — Unit Fraction Decomposition
Express any positive fraction as a sum of distinct unit fractions (1/2 + 1/4 + ...) using the Fibonacci–Sylvester greedy algorithm — as recorded in the Rhind Mathematical Papyrus circa 1650 BCE.
Step 1: ⌈4/3⌉ = 2, take 1/2
Numerator = 1 → take 1/4
Egyptian fraction decomposition
How does this calculator work?
An Egyptian fraction writes p/q as a sum of distinct unit fractions using the greedy algorithm: at each step take 1/⌈q/p⌉ and subtract it. For example, 3/4 = 1/2 + 1/4. The Fibonacci–Sylvester algorithm always terminates, though it may produce large denominators for some inputs.
Formula
How this is calculated
An Egyptian fraction is a sum of distinct unit fractions — fractions with numerator 1, such as 1/2, 1/3, 1/7. Ancient Egyptians (and their scribes) wrote all fractions this way in arithmetic tables; the Rhind Papyrus (c. 1650 BCE) lists decompositions for fractions from 2/3 through 2/101. Every positive rational number p/q has an Egyptian fraction representation, and the Fibonacci–Sylvester greedy algorithm always finds one.
The algorithm works by repeatedly subtracting the largest unit fraction that does not exceed the current remainder. At each step: compute n = ⌈q/p⌉ (the ceiling of q/p), record 1/n as the next term, and update the remainder to p·n − q over q·n, then reduce by the GCD. Because each step reduces the numerator (p·n − q < p when n > q/p), the algorithm terminates in a finite number of steps. The decomposition produced by the greedy method is not unique — other algorithms (e.g. splitting a fraction via the formula 2/(2k+1) = 1/(k+1) + 1/((k+1)(2k+1))) can produce shorter or different representations.
For most small fractions the greedy algorithm finishes in 2–5 steps, but adversarial inputs can produce very large denominators. This calculator caps the iteration at 20 steps and denominators at 10^15 to stay within JavaScript's safe integer range. If the decomposition is cut short, reduce or simplify the input fraction first.
Frequently asked questions
The Egyptian numeral system had special symbols only for unit fractions (and 2/3). Their arithmetic was additive, making unit fractions natural for problems like dividing loaves of bread among workers — the Rhind Papyrus contains detailed tables of decompositions precisely for this purpose.
No. For example 2/3 can be written as 1/2 + 1/6, or 1/3 + 1/3 (but with distinct fractions: 1/2 + 1/6 only). Different algorithms produce different valid decompositions. The greedy algorithm always gives a valid answer but not necessarily the shortest one.
For every integer n ≥ 2, the fraction 4/n can be written as the sum of at most three distinct unit fractions: 4/n = 1/a + 1/b + 1/c. This has been verified for all n up to 10^14 but not yet proved for all integers — it remains one of the oldest open problems in number theory.
Also known as
TG we-Calculate Editorial Team. (2026). Egyptian Fraction Calculator — Unit Fraction Decomposition [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/egyptian-fraction-calculator
TG we-Calculate Editorial Team. "Egyptian Fraction Calculator — Unit Fraction Decomposition." TG we-Calculate. 2026. https://we-calculate.com/calculator/egyptian-fraction-calculator.
TG we-Calculate Editorial Team, "Egyptian Fraction Calculator — Unit Fraction Decomposition," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/egyptian-fraction-calculator
@misc{wecalculate_egyptian_fraction_calculator, title = {Egyptian Fraction Calculator — Unit Fraction Decomposition}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/egyptian-fraction-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
