Fraction Calculator
A fraction calculator helps you add, subtract, multiply, and divide fractions, simplify a fraction to its lowest terms, and convert between fractions and decimals. It can also work with mixed numbers, such as 1 1/2, and show the steps behind a calculation.
FocalCalc provides four calculation modes in one tool: Fraction Operations, Simplify Fractions, Decimal to Fraction, and Fraction to Decimal. Choose the mode that matches your problem, enter the required values, and the result updates automatically as you change the inputs.
How to Use the Fraction Calculator
Choose one of the four modes according to the calculation you need.
- Fraction Operations: Add, subtract, multiply, or divide two fractions. You can also switch to mixed-number input.
- Simplify Fractions: Reduce a fraction to its simplest form and see the greatest common divisor used.
- Decimal to Fraction: Convert a finite decimal into a simplified fraction.
- Fraction to Decimal: Convert a fraction into a decimal, with an approximation marker when rounding is needed.
Each mode has its own input fields and results. Enter valid values for the selected mode; the calculator checks the inputs and updates the result without a separate Calculate button.
How to Add and Subtract Fractions
Fractions with different denominators must be expressed with a common denominator before their numerators can be added or subtracted. This calculator uses the least common multiple (LCM) of the denominators to find the least common denominator, or LCD.
Let the two fractions be a/b and c/d, where b and d are positive integers.
First, find the LCD:
L = lcm(b, d)
Then use the following formulas:
Addition:
a/b + c/d = [a × (L/b) + c × (L/d)] / L
Subtraction:
a/b − c/d = [a × (L/b) − c × (L/d)] / L
After the operation, the resulting fraction is simplified.
Example: Add 3/4 and 1/6
The denominators are 4 and 6.
LCD = lcm(4, 6) = 12
Convert both fractions to twelfths:
3/4 = 9/12
1/6 = 2/12
Add the numerators:
9/12 + 2/12 = 11/12
The result is 11/12.
Example: Subtract 3/4 from 1/2
The LCD of 2 and 4 is 4.
1/2 = 2/4
2/4 − 3/4 = −1/4
The result is −1/4.
The same process works when the denominators are already equal. In that case, the common denominator remains unchanged.
How to Multiply and Divide Fractions
Unlike addition and subtraction, multiplication and division do not require a common denominator.
Fraction Multiplication Formula
To multiply two fractions, multiply their numerators together and their denominators together.
a/b × c/d = (a × c) / (b × d)
For example:
2/3 × 3/5 = 6/15
The greatest common divisor of 6 and 15 is 3, so the result can be simplified:
6/15 = 2/5
The result is 2/5.
Fraction Division Formula
To divide by a fraction, multiply by its reciprocal. The reciprocal is found by switching the numerator and denominator.
a/b ÷ c/d = a/b × d/c = (a × d) / (b × c)
The divisor must not be zero, so the second fraction cannot have a numerator of zero when its denominator is positive.
For example:
1/2 ÷ 1/3 = 1/2 × 3/1
= 3/2
The result is 3/2, or 1 1/2 as a mixed number.
The calculator simplifies the resulting fraction and displays additional representations when applicable.
How to Simplify Fractions
A fraction is in simplest form when its numerator and denominator have no common positive factor greater than 1. To simplify a fraction, divide both by their greatest common divisor (GCD), also called the greatest common factor (GCF).
For a fraction n/d, where d is positive, the formula is:
g = gcd(|n|, d)
Then divide both parts by g:
Simplified fraction = (n/g) / (d/g)
Example: Simplify 18/24
Find the greatest common divisor:
gcd(18, 24) = 6
Divide the numerator and denominator by 6:
18 ÷ 6 = 3
24 ÷ 6 = 4
Therefore:
18/24 = 3/4
The fraction 3/4 is in simplest form because 3 and 4 have no common factor greater than 1.
A negative fraction can be simplified in the same way. For example, −18/24 = −3/4. The negative sign remains with the value while the numerator and denominator are reduced.
If the numerator is zero and the denominator is positive, the fraction equals 0. If the simplified denominator is 1, the result is an integer. For example, 9/9 = 1.
How to Calculate With Mixed Numbers
A mixed number contains a whole-number part and a fractional part. For example, 2 1/3 means 2 plus 1/3, which is equivalent to the improper fraction 7/3.
To convert a positive mixed number into an improper fraction, multiply the whole-number part by the denominator and add the numerator.
Improper numerator = (Whole number × Denominator) + Numerator
Keep the same denominator.
For example:
2 1/3 = (2 × 3 + 1)/3
= 7/3
For a negative mixed number, the negative sign applies to the entire value:
−2 1/3 = −(2 × 3 + 1)/3 = −7/3
It does not mean −2 + 1/3.
In the calculator’s Mixed number input format, enter the whole-number part, numerator, and denominator separately. Use the sign control for a negative value. The fractional part must be nonnegative and smaller than the denominator.
Mixed numbers can be useful when a result is easier to read as a whole number plus a fraction. For example, 7/3 is equivalent to 2 1/3.
How to Convert a Decimal to a Fraction
A finite decimal can be expressed as a fraction by removing the decimal point, using a power of 10 as the denominator, and simplifying the result.
If the decimal has k digits after the decimal point, use 10^k as the denominator.
Initial fraction = Integer formed by the decimal digits / 10^k
Then reduce the fraction by dividing its numerator and denominator by their greatest common divisor.
Example: Convert 0.125 to a Fraction
There are three digits after the decimal point, so the initial denominator is 10^3 = 1,000.
0.125 = 125/1,000
The GCD of 125 and 1,000 is 125.
125/1,000 = 1/8
The result is 1/8.
Example: Convert 1.25 to a Fraction
There are two digits after the decimal point:
1.25 = 125/100
Divide both numbers by 25:
125/100 = 5/4
The improper fraction 5/4 can also be written as the mixed number 1 1/4.
The result is 5/4, or 1 1/4 as a mixed number.
Negative decimals work in the same way. For example:
−0.75 = −75/100 = −3/4
The Decimal to Fraction mode accepts finite decimals with up to six decimal places. It does not accept repeating-decimal notation or scientific notation.
How to Convert a Fraction to a Decimal
To convert a fraction into a decimal, divide the numerator by the denominator. The result may terminate after a finite number of decimal places or continue indefinitely.
For example:
1/8 = 0.125
This decimal is exact, so no approximation marker is needed.
However:
1/3 = 0.333333…
The decimal repeats. FocalCalc displays up to six decimal places and marks a rounded result with the approximation symbol (≈):
1/3 ≈ 0.333333
Another example is:
2/3 ≈ 0.666667
The displayed decimal is an approximation; the exact value remains 2/3.
If a fraction can be expressed exactly within six decimal places, the calculator displays that decimal without the approximation symbol. When rounding is required, it rounds to the nearest value at six decimal places, with exact halfway cases rounded away from zero.
For example:
1/8 = 0.125
5/2 = 2.5
1/128 ≈ 0.007813
The last result is approximate because the exact decimal value, 0.0078125, has more than six decimal places.
Input Limits and Valid Values
The calculator validates inputs to prevent undefined operations and unsupported values.
For ordinary fraction inputs:
- The numerator must be an integer from −1,000,000 to 1,000,000.
- The denominator must be a positive integer from 1 to 1,000,000.
- A denominator of zero or a negative denominator is not accepted.
For mixed-number inputs:
- The whole-number part must be from 0 to 1,000,000.
- The fractional numerator must be nonnegative and smaller than the denominator.
- Use the separate sign control to enter a negative mixed number.
For Decimal to Fraction:
- The absolute value must not exceed 1,000,000.
- Up to six digits after the decimal point are accepted.
- Scientific notation, repeating-decimal notation, empty values, and invalid decimal formats are not accepted.
For Fraction to Decimal, the result is displayed to a maximum of six decimal places. The approximation symbol indicates when the displayed decimal is rounded. This rounding affects only the decimal display, not the exact fraction calculation.
A denominator must always be positive. Division by a zero-valued second fraction is invalid because division by zero is undefined.
Frequently Asked Questions
How do you add fractions with different denominators?
Find the least common denominator, convert both fractions to equivalent fractions with that denominator, and add the numerators. Simplify the result if necessary. For example, 3/4 + 1/6 = 9/12 + 2/12 = 11/12.
How do you divide fractions?
Multiply the first fraction by the reciprocal of the second fraction. For example, 1/2 ÷ 1/3 = 1/2 × 3/1 = 3/2. The second fraction cannot equal zero.
What is the difference between a fraction and a mixed number?
A fraction such as 7/3 expresses a value as a numerator over a denominator. A mixed number expresses the same value using a whole number and a fractional part: 7/3 = 2 1/3.
How do you simplify a fraction?
Find the greatest common divisor of the absolute numerator and the positive denominator. Divide both by that number. For example, 18/24 simplifies to 3/4 because both 18 and 24 are divisible by 6.
Can every decimal be converted to a fraction?
Every finite decimal can be expressed as a fraction. A repeating decimal can also represent a rational number, but this calculator’s Decimal to Fraction mode accepts only finite decimal input with up to six decimal places. It does not accept repeating-decimal notation such as 0.333…
Why does a fraction-to-decimal result show an approximation symbol?
The symbol ≈ means the displayed decimal is rounded rather than exact. FocalCalc displays up to six decimal places and uses the approximation symbol when additional digits must be rounded. The original fraction remains the exact representation.
Why can’t I enter a zero denominator?
A fraction with a denominator of zero is undefined. The calculator therefore requires a positive denominator for every fraction input.