DevTools Logo

Fraction Calculator

Fraction Calculator

Add, subtract, multiply and divide fractions with exact arithmetic and every step shown.

Runs in your browser
Integers, a/b, mixed numbers, decimals and 0.(3) are accepted.
Try an example

Expression

Use + - × ÷ and parentheses. Mixed numbers need a space: 1 1/2. Exponents such as (2/3)^2 stay exact.

Result

Enter a fraction expression

Try 2/3 + 1/4 or load an example above.

Examples

Unlike denominators

Input
2/3 + 1/4
Output
11/12 = 0.91(6)

The LCD is 12, so the sum is 8/12 + 3/12 = 11/12, already in lowest terms.

Mixed number times a fraction

Input
1 1/2 × 2/3
Output
1

The mixed number is normalized to 3/2; multiplying crosswise gives 6/6 = 1.

Divide by a fraction

Input
3/4 ÷ 1/8
Output
6

Dividing by 1/8 means multiplying by its reciprocal 8/1, giving 24/4 = 6.

Repeating decimal with an integer part

Input
2.1(6)
Output
13/6

The repeating part is 2 + (16 − 1)/90 = 2 + 1/6 = 13/6.

About this tool

The Fraction Calculator does exact rational arithmetic: every value is stored as a BigInt numerator and denominator in lowest terms, so 2/3 + 1/4 is 11/12 rather than 0.9166666667. There is no floating-point step in the calculation, which means long numerators, deep chains and tiny denominators keep their exact value all the way through. The answer is shown three ways at once — improper fraction, mixed number and decimal — because different homework formats and recipes ask for different representations.

Input is deliberately forgiving. Write 2/3, an integer, a mixed number with a space (1 1/2), a pasted vulgar fraction (1½), a terminating decimal (0.375) or repeating notation (0.(3), 0.1(6)). Typographic operators from worksheets and phones are normalized, so −, ×, · and ÷ work alongside their keyboard aliases -, * and /; parentheses and the usual precedence rules make chains such as ((1/2 + 1/3) × 6) ÷ 5 unambiguous. A hand-written parser reads the expression — the tool never calls eval or executes user input.

The working is part of the answer. Addition and subtraction show how the least common denominator is found and how each numerator is rescaled; multiplication shows the crosswise products; division shows the reciprocal before multiplying; powers stay exact for integer exponents; and every reduction names the gcd that was removed. Repeating decimals use the standard (all digits − non-repeating digits) / (9s followed by 0s) method, including the integer part, so 2.1(6) becomes 2 + 15/90 = 13/6.

Switch to Simplify to reduce a single fraction and see its gcd, or to To fraction to convert a decimal into an exact fraction. Recent expressions can be restored with one click, and Copy link shares the current expression through the URL. Everything runs locally in your browser tab: no expression is uploaded, stored on a server, or used for analytics.

What this tool does not do

  • Powers accept whole-number exponents from -64 to 64; roots and fractional exponents are out of scope.
  • Decimal displays are capped at 48 places. Longer expansions are truncated with an ellipsis and a notice, while the fraction and mixed number stay exact.
  • History lives in memory for the current session and is not stored between page reloads.
  • This is an arithmetic aid for learning and checking, not a homework-submission service and not a symbolic algebra system.

How to use this tool

  1. Enter an expression

    Type a fraction, mixed number or decimal into the Expression field. Fractions update the result as you type; the result appears in the Output panel.

  2. Choose a mode

    Calculate handles full expressions with operators and parentheses. Simplify reduces a single fraction. To fraction converts one decimal, including repeating notation, to an exact fraction.

  3. Read the three answers

    The Output panel shows the improper fraction, a mixed number and the exact decimal side by side. Copy any single answer with its own copy button.

  4. Follow the working

    The numbered Working list records each operation in order — common denominators, cross-multiplication, reciprocals and gcd reductions — so you can check a homework step.

  5. Reuse and share

    Click Evaluate to pin an expression to Recent, click a recent entry to restore it, or use Copy link to share the expression through the URL.

Use cases

Checking homework

Students enter an exercise and compare each step of the working with their own, including the LCD and the final gcd reduction, instead of trusting a rounded decimal.

Making worked examples

Teachers generate exact answers for different-denominator sums, mixed-number products and fraction divisions, then copy the answer or share the expression link with a class.

Recipes and measurements

Scale a recipe by a fractional amount, for example 1 1/2 cups × 2/3, and read the answer as a fraction or a familiar mixed number without drift.

Verifying exact values

Developers and data analysts convert repeating decimals into fractions exactly, which is useful when a decimal approximation would hide the underlying rational value.

Accepted notation

InputMeaning
2/3A proper fraction, reduced on entry
1 1/2 or 1½One and a half, parsed as 3/2
-1 1/2Negative mixed number, parsed as -3/2
0.375Terminating decimal, converted to 3/8
0.(3) / 0.1(6)Repeating decimal, converted to 1/3 and 1/6
+ - − × · ÷ / ^Operators, with parentheses and standard precedence

Expressions are capped at 500 characters. Exponents are whole numbers from -64 to 64; fractional powers need roots and are not supported.

Common mistakes

Mistake:Reading a mixed number as multiplication.

Fix:1 1/2 means one plus one half, not 1 × 1/2. Put a space between the whole number and the fraction, or paste 1½ directly.

Mistake:Dropping the integer part of a repeating decimal.

Fix:For 2.1(6), the repeating formula gives only the fractional 1/6. The tool adds the integer part 2, producing 13/6.

Mistake:Assuming a short decimal display is the exact value.

Fix:1/6 cannot be written as a terminating decimal. The tool shows 0.1(6), with parentheses marking the repeating block; the fraction is the exact answer.

Mistake:Treating a very long decimal as rounded.

Fix:Terminating and repeating expansions longer than 48 places are truncated in the decimal card with an ellipsis and a notice. The fraction and mixed number remain exact.

Mistake:Dividing by zero in a fraction literal.

Fix:A denominator of zero has no valid value. The tool marks the offending position and explains the fix; no result is shown.

Frequently asked questions

How do you add fractions with different denominators?

Find the least common multiple of the denominators, then rescale each fraction so both have that denominator and add the numerators. For 2/3 + 1/4 the LCD is 12, so the sum becomes 8/12 + 3/12 = 11/12. The calculator writes out each of those steps, including the final check for a common factor.

Why is the answer shown as an improper fraction and a mixed number?

Both are the same value in different formats. An improper fraction such as 11/4 is convenient for further arithmetic, while the mixed number 2 3/4 is easier to picture and is often the format a homework sheet asks for. Showing both, together with the decimal, means you can pick the form you need without doing another conversion.

How does the calculator simplify fractions automatically?

Every result is built as a BigInt numerator and denominator, then divided by their greatest common divisor, found with Euclid's algorithm. The denominator's sign is moved to the numerator. When a reduction happens, the Working list shows the gcd, for example gcd(18, 24) = 6, so 18/24 becomes 3/4.

Can I enter decimals or repeating decimals?

Yes. A terminating decimal like 0.375 is scaled by a power of ten and reduced to 3/8. Repeating notation uses parentheses: 0.(3) means 0.333… = 3/9 = 1/3, and 0.1(6) means 1/6. The integer part is included, so 2.1(6) converts to 2 + 15/90 = 13/6. Use To fraction mode to convert a single decimal on its own.

Why exact answers instead of decimal answers?

Floating-point arithmetic turns some simple fractions into artifacts such as 0.30000000000000004. This tool never converts the calculation to a float: the numerator and denominator stay integers, and the decimal is derived only at the end for display. That keeps long chains, large numerators and repeating values exact.

What happens with a very long decimal expansion?

The decimal card shows at most 48 places. A terminating expansion with more places, or a repeating block longer than that, is truncated with an ellipsis and a notice. The improper fraction and mixed number are unaffected and remain exact, so you can always copy the exact value.

References & standards