Fraction Calculator

Add, subtract, multiply, divide and simplify fractions exactly. Use large integers and negative fractions, then copy or save TXT and JSON results.

How to use

  1. Enter the numerator and denominator of each fraction.
  2. Choose addition, subtraction, multiplication or division and calculate.
  3. Review the result in lowest terms and copy the fraction or report.

Enter fractions

Left fraction

Right fraction

Enter plain integers in numerator and denominator fields. Up to 1,000 digits excluding the sign and 2,001 characters per field. Surrounding whitespace is trimmed. Decimals, exponents, commas and mixed-number input are not supported. Zero denominators are invalid.

Simplify uses only the left fraction. TXT output is limited to 5,000 bytes and JSON to 32,000 bytes. Inputs and results are neither stored nor sent.

Result

Try a use case and check the result

Try fraction multiplication and reduction with a negative denominator, then check the exact fraction and sign.

Example buttons replace the inputs and settings above and calculate. Restore previous input steps back one example at a time. After trying multiple examples, repeat restore to return to your original input. This history is lost when the page closes.

Multiply 2/3 by 9/4

Input and settings

Operation: multiply / Left: 2/3 / Right: 9/4

Expected result

3/2 (reduced without converting to decimals)

Normalize the sign and reduce 2/−4

Input and settings

Operation: reduce only / Left: 2/−4 / Right fraction unused

Expected result

-1/2 (positive denominator; sign on numerator)

How to read the result

Multiplication reduces 18/12 to 3/2. Negative denominators move their sign to the numerator. Reduce-only ignores the right fraction and disables its fields. Whole-number results still use fraction form, such as 2/1, and zero becomes 0/1.

Scope and limits

Numerators and denominators are signed integers. Zero denominators and division by a zero fraction are rejected. Decimals, exponents, commas and typing 1/2 in one field are unsupported. Each integer allows 1,000 digits including leading zeros but excluding the sign, and each field 2,001 characters including whitespace. BigInt arithmetic is exact, with limits of 5,000 bytes for the fraction and 32,000 for JSON.

Verification: existing functions cover cross-cancellation, negative denominators, zero-denominator/division rejection and integers beyond safe Number precision. Browser checks compare right-field enablement, original-input restoration and downloaded results.

Continue with the next task

Details and limits

The example is 1/2 + 1/3 = 5/6. Addition and subtraction use a common denominator. Multiplication multiplies numerators and denominators; division multiplies by the reciprocal of the right fraction. All results are reduced by their greatest common divisor.

A negative denominator moves its sign to the numerator: 2/-4 becomes -1/2. Zero is written as 0/1 and integers as fractions such as 3/1. A zero fraction such as 0/5 is valid input, but you cannot divide by it.

BigInt arithmetic keeps large integers exact, without floating-point conversion or rounding. Leading zeros and sign spelling are normalized. Decimal output, mixed-number output and multi-operation expressions are not supported.

TXT contains only the reduced fraction. JSON includes the operation, normalized and reduced input fractions, and result. Numerators and denominators are strings to retain precision. Both formats use UTF-8 without a BOM or added trailing newline.

Editing inputs or changing the operation cancels in-progress work and clears old results. Cancel retains the input. Reset clears numerators and restores denominators to 1 while retaining the operation. The example selects addition.

Frequently asked questions

What happens with zero denominators or division by zero?

A zero denominator is undefined and produces an error. A fraction such as 0/5 is zero and cannot be used as the divisor. Errors invalidate previous copy and save results.

Can I just simplify a fraction?

Select Simplify left fraction. The right fields are disabled and only the left fraction is used.

Are large numbers rounded?

No. Integers with up to 1,000 digits are calculated exactly, and results retain their full integer strings. Inputs exceeding the limit produce an error.

Related tools

Inputs and storage

Keep any content you need before clearing. This tool does not autosave inputs or results. Reloading or closing the page, clearing inputs or resetting may discard your work.

Favorites and language preferences are stored separately and may be lost when site data is cleared. Tool resets and site-data deletion do not delete files already downloaded to your device.

Explore tools & games

All 120 tools · 16 games

All 120 tools · 16 games

Text & writing 26

Calculators & converters 22

Date & time 12

Images & PDF 26

Data & web 28

Random & handy 6

Games 16