Egyptian Fraction Calculator

Break a rational number into distinct unit fractions with exact arithmetic.

Results are calculated automatically as you enter data.

Positive rational inputs are handled exactly. Every successful result is a sum of distinct unit fractions; finite decimals are converted to fractions before decomposition.

Subtraction steps
Result Enter a positive rational number.

▼ See explanations and tips below ▼

What Is an Egyptian Fraction?

An Egyptian fraction is a way to write a positive rational number as a sum of unit fractions. A unit fraction is a fraction with numerator \(1\), such as \(\frac{1}{2}\), \(\frac{1}{5}\), or \(\frac{1}{120}\).

In most modern uses, the unit fractions in an Egyptian fraction are expected to have distinct denominators. That means the same unit fraction should not be repeated. For example:

$$ \frac{43}{48}=\frac{1}{2}+\frac{1}{3}+\frac{1}{16} $$

This is an Egyptian fraction because every term on the right is a unit fraction and the denominators \(2\), \(3\), and \(16\) are all different.

Egyptian fractions are useful because they show a rational number as a collection of simple reciprocal parts. Instead of describing a quantity with one numerator and one denominator, the number is broken into distinct pieces of the form \(\frac{1}{d}\).


Why Egyptian Fractions Matter

Egyptian fractions connect basic fraction arithmetic with number theory. They help students see fractions as exact rational numbers rather than only as decimals, and they provide a concrete example of an algorithm: a repeatable step-by-step method that eventually reaches an answer.

They are also a good way to compare exact arithmetic with approximation. The equation

$$ \frac{7}{8}=\frac{1}{2}+\frac{1}{3}+\frac{1}{24} $$

is exact. A decimal such as \(0.875\) is another exact way to write \(\frac{7}{8}\) when it has finitely many decimal places, but many fractions do not have terminating decimals. Egyptian fractions keep the work in rational-number form, so the equality can be checked by ordinary fraction addition.

Egyptian fractions also show that the same rational number can often be decomposed in more than one way. This makes them useful for exploring questions such as: Is the greedy result short? Are there smaller denominators? Can another method produce fewer unit terms?


Key Terms to Know

  • Rational number: A number that can be written as \(\frac{n}{m}\), where \(n\) and \(m\) are integers and \(m \ne 0\).
  • Unit fraction: A fraction with numerator \(1\), such as \(\frac{1}{9}\).
  • Egyptian fraction: A sum of distinct positive unit fractions.
  • Proper fraction: A fraction whose absolute value is less than \(1\), such as \(\frac{5}{8}\).
  • Improper fraction: A fraction whose numerator is greater than or equal to its denominator, such as \(\frac{17}{5}\).
  • Strict Egyptian form: A sum made only of distinct unit fractions, including for supported improper inputs.
  • Simplified fraction: A fraction whose numerator and denominator have no common factor greater than \(1\).
  • Ceiling function: The operation \(\lceil x \rceil\), which rounds \(x\) up to the smallest integer greater than or equal to \(x\).
  • Greedy algorithm: An algorithm that makes the locally largest or most direct choice at each step. For Egyptian fractions, it chooses the largest unit fraction that does not exceed the current remainder.

How Egyptian Fraction Decomposition Works

For a positive proper fraction \(\frac{p}{q}\), the greedy method chooses the largest unit fraction that is no bigger than the current fraction. Because unit fractions get smaller as their denominators get larger, the next denominator is:

$$ d=\left\lceil \frac{q}{p} \right\rceil $$

Then subtract that unit fraction from the current remainder:

$$ \frac{p}{q}-\frac{1}{d}=\frac{pd-q}{qd} $$

After the subtraction, the remainder is simplified and the process repeats. If the remainder is already a unit fraction, the decomposition is finished.

The ceiling rule works because \(d\) must be large enough that \(\frac{1}{d}\) does not exceed \(\frac{p}{q}\). Choosing \(d=\left\lceil \frac{q}{p} \right\rceil\) gives the smallest allowed denominator, which means it gives the largest allowed unit fraction.

The greedy method terminates because each nonzero remainder has a smaller numerator than the previous proper fraction after the greedy subtraction. Since positive integer numerators cannot decrease forever, the process eventually reaches a unit fraction and stops.

Whole parts and improper fractions

When the input is greater than or equal to \(1\), the calculator still returns a strict Egyptian fraction: every displayed term is a distinct reciprocal \(\frac{1}{d}\). To keep the complete result readable and responsive, supported inputs have a whole part no greater than \(3\).

For the simple improper input \(2\), the strict result is:

$$ 2=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{6} $$

A strict Egyptian result contains no separate whole-number term: every displayed addend is a unit fraction.

Split mode

A unit fraction can be split into two smaller unit fractions using the identity:

$$ \frac{1}{d}=\frac{1}{d+1}+\frac{1}{d(d+1)} $$

For example:

$$ \frac{1}{24}=\frac{1}{25}+\frac{1}{600} $$

This keeps the total value exactly the same, but it usually increases the number of terms. Split mode is useful for seeing how one Egyptian-fraction representation can be transformed into another.

Bounded search mode

A greedy decomposition is systematic, but it is not guaranteed to use the fewest possible unit fractions. A bounded search can look for a shorter representation within fixed limits.

For example, the greedy decomposition of \(\frac{5}{121}\) has several terms with very large denominators, but this shorter exact decomposition also works:

$$ \frac{5}{121}=\frac{1}{33}+\frac{1}{121}+\frac{1}{363} $$

A bounded search result should be read carefully: it can show that a shorter result was found within the search limits, but it does not prove that no better result exists outside those limits.


Examples of Egyptian Fractions in Practice

Example 1: Converting a Decimal First

Suppose the input is \(0.875\). A terminating decimal can be written over a power of \(10\):

$$ 0.875=\frac{875}{1000} $$

Simplify the fraction by dividing the numerator and denominator by \(125\):

$$ \frac{875}{1000}=\frac{7}{8} $$

Now apply the greedy method. First choose:

$$ d=\left\lceil \frac{8}{7} \right\rceil=2 $$

Subtract:

$$ \frac{7}{8}-\frac{1}{2}=\frac{3}{8} $$

Next choose:

$$ d=\left\lceil \frac{8}{3} \right\rceil=3 $$

Subtract:

$$ \frac{3}{8}-\frac{1}{3}=\frac{1}{24} $$

The remainder is now a unit fraction, so the final Egyptian fraction is:

$$ 0.875=\frac{7}{8}=\frac{1}{2}+\frac{1}{3}+\frac{1}{24} $$

Example 2: A Classic Proper Fraction

For \(\frac{43}{48}\), the first denominator is:

$$ d=\left\lceil \frac{48}{43} \right\rceil=2 $$

Subtract the first unit fraction:

$$ \frac{43}{48}-\frac{1}{2}=\frac{19}{48} $$

The next denominator is:

$$ d=\left\lceil \frac{48}{19} \right\rceil=3 $$

Subtract again:

$$ \frac{19}{48}-\frac{1}{3}=\frac{1}{16} $$

So:

$$ \frac{43}{48}=\frac{1}{2}+\frac{1}{3}+\frac{1}{16} $$

Each term is a unit fraction, and the denominators are distinct.


Example 3: An Improper Fraction

For the improper input \(2\), every displayed term remains a distinct unit fraction:

$$ 2=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{6} $$

This result means the original value is exactly the sum of four distinct unit fractions.


How to Interpret the Result

The result equation is the most important output. It means the original input is exactly equal to the listed distinct unit fractions.

When reading the result, keep these points in mind:

  • Strict unit terms: Every displayed addend is a distinct unit fraction, including for supported improper inputs.
  • Unit terms: This is the number of unit fractions used for the fractional remainder.
  • Greedy terms: This gives the baseline number of terms from the greedy method before any split or shorter search replacement.
  • Method: This tells you whether the displayed result came from the greedy method, a split of the last greedy term, or a shorter bounded-search result.
  • Search note: This explains what the bounded search did. It is a computation note, not a proof of global optimality.
  • Subtraction steps: These show the exact remainders after each greedy subtraction. If a shorter search result replaces the greedy result, the greedy subtraction table may not be shown because the displayed result no longer follows those step-by-step greedy remainders.
  • Visual bars and tooltips: These help you see the relative size of unit fractions. The exact fraction equation is authoritative; decimal and percent displays are explanatory approximations.

A result with fewer unit terms is often easier to read, but it is not automatically “better” for every purpose. Sometimes a greedy result is useful because it shows a simple repeatable process, while a shorter non-greedy result is useful because it is more compact.


Common Mistakes and Misconceptions

One common mistake is entering a value that is not a positive rational number. Zero, negative values, and fractions with denominator zero do not have a valid positive Egyptian-fraction decomposition in this calculator.

Another common mistake is using an unsupported input format. Use a simple fraction such as 43/48, an integer such as 3, or a finite decimal such as 0.875. Do not use mixed numbers such as 1 1/2, percentages such as 87.5%, scientific notation such as 1e-3, repeating-decimal notation, comma-formatted numbers, or leading-dot decimals such as .875.

A third misconception is that the greedy method always gives the shortest Egyptian fraction. It does not. Greedy decomposition is reliable and systematic, but another method may find fewer terms or smaller denominators for some fractions.

A strict result does not contain a separate whole part. Every addend shown in the equation is a unit fraction.

$$ 2=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{6} $$

the calculator verifies that all displayed denominators are distinct and that the exact sum equals the original input.

Finally, do not treat visual decimal or percent values as replacements for the exact equation. The exact rational expression is the result to use when checking equality.


When to Use Egyptian Fractions

Use Egyptian fractions when you want to:

  • Practice exact fraction arithmetic.
  • Understand unit fractions and rational-number decomposition.
  • See how a greedy algorithm works step by step.
  • Compare different decompositions of the same rational number.
  • Explore why some algorithms are systematic but not always shortest.
  • Create classroom examples involving proper fractions, improper fractions, and decimal-to-fraction conversion.

Egyptian fractions are mainly an educational and number-theory topic. They are not usually the most convenient notation for everyday measurement, finance, or scientific reporting, but they are valuable for learning how exact rational decompositions work.


Limitations and Things to Keep in Mind

The calculator accepts positive rational inputs and rejects values that simplify to zero or a negative number. It also rejects denominator-zero inputs.

Only simple fractions, integers, and finite decimals are supported. Mixed numbers, percentages, repeating decimals, scientific notation, comma separators, and leading-dot decimals are not supported input formats.

The greedy method is exact, but it can sometimes produce many terms or very large denominators. To keep the calculation practical, the greedy method stops with an error after more than \(1{,}000\) unit terms.

Bounded search is intentionally limited. Search depth must be an integer from \(2\) to \(6\), candidate denominators are limited to \(50{,}000\), and the search stops after \(25{,}000\) visited states. If that state limit is reached, the calculator reports that the search was incomplete. The search result replaces the greedy result only when it finds fewer unit terms.

The exact fraction equation is not decimal-rounded. However, visual positions, tooltip decimals, and percentages are approximate displays. For very large rational values or denominators, those visual approximations can be less precise even when the exact fraction result remains correct.

Egyptian-fraction representations are not unique. A result is one valid decomposition, not the only possible decomposition.


How to Use This Calculator

  1. Enter a positive fraction such as 43/48, an integer such as 3, or a finite decimal such as 0.875.
  2. Choose a method: greedy decomposition, greedy plus unit split, or bounded search for a shorter decomposition.
  3. If you use bounded search, enter a search depth from \(2\) to \(6\).
  4. Review the exact result equation and the summary values, including unit-term count, strict-greedy-term count, method, and search note.
  5. Use the visual bars and unit-fraction table to inspect how each term contributes to the total.
  6. Hover, focus, or click visual bars or table rows to highlight individual terms and view details.
  7. Use the PNG download button if you want to save the decomposition graph.
  8. Use the example presets to load sample proper, improper, or classic fraction examples.

Frequently Asked Questions

Are Egyptian fractions unique?

No. Many rational numbers can be written as Egyptian fractions in more than one way. For example, splitting a unit fraction can create a different representation with the same exact value.


Why does the greedy method choose \(d=\left\lceil \frac{q}{p} \right\rceil\)?

For a remainder \(\frac{p}{q}\), the next unit fraction must be no larger than the remainder. The ceiling rule gives the smallest denominator that satisfies that condition, which makes \(\frac{1}{d}\) the largest allowed unit fraction.


Does bounded search prove the shortest possible result?

No. Bounded search only checks possibilities within its depth, denominator, and state limits. If it finds a shorter result, that result is valid; if it does not, there still may be a shorter decomposition outside the search limits.


Can I enter a decimal?

Yes, finite positive decimals such as 0.875 are supported. The decimal is treated as an exact rational number based on the digits entered, then simplified before decomposition.


What happens if the input is an improper fraction?

For supported values (whole part at most \(3\)), the calculator returns a strict Egyptian fraction: every displayed addend is a distinct unit fraction. Larger whole parts are rejected to keep the complete exact result practical to render.


Why are repeated unit fractions avoided?

Without the distinct-denominator rule, Egyptian fractions become much less meaningful because any fraction \(\frac{a}{b}\) could be written as repeated copies of \(\frac{1}{b}\). Distinct denominators make the decomposition more structured and mathematically interesting.


Sources and References