Fraction Calculator
Enter two numbers and an operator to get the simplified fraction, mixed number, decimal and percent.
Fractions are where arithmetic starts to trip people up: 0.5 and 1/2 are the same number, and simplifying or finding a common denominator is a reliable source of mistakes. This tool accepts whatever form you have — a proper fraction, a decimal, a percentage or a mixed number — and puts the result into several notations at once, so that 3/4, 0.75 and 75% can be seen to be one and the same value.
Results are reduced to lowest terms automatically (6/8 becomes 3/4), and an improper fraction is shown alongside its mixed-number form (7/3 = 2 1/3). Division follows the multiply-by-the-reciprocal rule, and dividing by zero is reported as an error rather than quietly producing infinity. Percentage input is parsed as 75% = 0.75.
Did this tool solve your problem?
Submitting sends the tool name, your input and the current result to the server. Please do not include ID numbers, phone numbers or other private data.
AI assistant It answers using your current input and result
Asking again sends your current input and result to the server once more. Please do not include private data.
How to use
- Enter two values in any form — 1/3, 0.75, 75% or 2 1/3.
- Choose the operation (add, subtract, multiply or divide).
- Read the simplified fraction, mixed number, decimal and percentage.
- Use the comparison table to see all three notations for both inputs and the result.
How it works
Why fractions instead of decimals
This tool computes with rational numbers, not floats: a/b ± c/d is brought to a common denominator first; multiplication multiplies numerators and denominators; division multiplies by the reciprocal. For 1/3 + 1/6: common denominator 6 gives 2/6 + 1/6 = 3/6, which reduces to 1/2. Numerator and denominator are stored as integers (BigInt), so values like 1/3 that never terminate are never polluted by a 0.333333 float approximation.
What reducing and common denominators do
Reducing means dividing numerator and denominator by their greatest common divisor; a common denominator means unifying denominators to their least common multiple. Results are always given in lowest terms, plus a mixed number: 22/7 becomes 3 1/7 — more intuitive in kitchens and workshops than an improper fraction, though improper fractions are handier inside algebra.
Reading and writing repeating decimals
Decimals come in two kinds: if the denominator's prime factors are only 2s and 5s the decimal terminates (7/8 = 0.875, 3/4 = 0.75); otherwise a repeating block appears in parentheses: 1/3 = 0.(3), 5/6 = 0.8(3), 22/7 = 3.(142857). Parentheses mean the digits repeat forever — only the fraction is the exact value.
Calculation basis: fraction arithmetic follows the rules for rational numbers (common denominators for addition and subtraction, numerator × numerator over denominator × denominator for multiplication, multiply by the reciprocal for division); numerator and denominator are kept as integers (BigInt) and reduced to lowest terms. Repeating decimals are detected by tracking remainders in long division.
Code example
JavaScript A fraction class: reduce with GCD
const gcd = (a, b) => b ? gcd(b, a % b) : Math.abs(a);
class Frac {
constructor(n, d) {
if (d < 0) { n = -n; d = -d; }
const g = gcd(n, d) || 1;
this.n = n / g; this.d = d / g; // reduced on construction
}
add(o) { return new Frac(this.n * o.d + o.n * this.d, this.d * o.d); }
mul(o) { return new Frac(this.n * o.n, this.d * o.d); }
toString() { return this.n + "/" + this.d; }
}
new Frac(6, 8).toString(); // "3/4"
Python The fractions standard library
from fractions import Fraction
Fraction(6, 8) # Fraction(3, 4) (reduced automatically)
Fraction(0.75) # Fraction(3, 4)
Fraction("2 1/3") # mixed-number strings are not supported; split them yourself
Fraction(1, 3) + Fraction(1, 6) # Fraction(1, 2)
float(Fraction(1, 3)) # 0.333...
FAQ
Is 1/3 the same as 0.333?
No. 0.333 is only an approximation of 1/3 — multiplying it by 3 gives 0.999, not 1; 1/3 is exact. Working in fractions avoids error accumulating through further calculations, which is exactly why this tool uses integer arithmetic.
How do I convert a decimal back to a fraction?
Just type the decimal in (0.75 → 3/4). The principle: 0.75 = 75/100, and dividing top and bottom by 25 gives 3/4. For repeating decimals use the algebra trick: set x = 0.(3), then 10x − x = 3, so x = 1/3.
How do I enter a mixed number?
Separate the whole part from the fraction with a space: "2 1/3" means two and one third (= 7/3). Be careful not to type "21/3" as a mixed number — that reads as 21/3 = 7.
Why isn't 1/2 + 1/3 equal to 2/5?
Denominators cannot simply add. Bring both to a common denominator first: 1/2 = 3/6 and 1/3 = 2/6, so the numerators add to 5/6. The answer 2/5 is wrong — numerically 0.4 is smaller than either addend, which is impossible for a sum.
Why does dividing fractions turn into multiplication?
Dividing by a number is multiplying by its reciprocal: (3/4) ÷ (1/8) = (3/4) × 8 = 6. This reduces everything to one multiplication rule instead of a separate division procedure.
What is the mixed number in the result for?
Mixed numbers read more naturally in everyday settings (3 1/7 cups of flour beats 22/7), while improper fractions plug straight into algebra. Both are valid, so the tool shows both.
Are the numbers I enter uploaded anywhere?
No. Numerators and denominators are processed as integers locally in your browser — nothing is sent to a server and nothing is stored. The calculation history lives only in this browser, can be cleared with one click, and vanishes when an incognito window closes.