Worked example: Fraction Calculator
Half plus third (legacy inputs). This fixed reference example shows one complete scenario; the interactive results above use your current inputs.
View the example inputs
- Calculate
- Fraction arithmetic
- Operation
- Add (+)
- First numerator
- 1
- First denominator
- 2
- Second numerator
- 1
- Second denominator
- 3
| Calculated quantity | Example result |
|---|---|
| Exact reduced fraction | 5/6 |
| Mixed number / whole number | 5/6 |
| Decimal expansion | 0.8(3) |
| Floating-point approximation | 0.8333333333 |
Fraction calculator: understand the parts, signs and exact answer
What do the numerator and denominator mean?
A fraction a/b describes a value using a numerator a and a nonzero denominator b. For an ordinary positive part of a whole, b tells you how many equal parts make one whole and a tells you how many of those parts you have. Five eighths means five parts when each whole has been divided into eight equal pieces. The pieces must be equal for that interpretation to work.
This fraction calculator also accepts negative values, improper fractions and zero. A numerator greater than its positive denominator represents more than one whole; 9/4 means two wholes and one quarter. A denominator of zero is undefined, including 0/0. A zero numerator with a nonzero denominator is a valid zero and is reduced to 0/1.
How do I add fractions with different denominators?
Addition requires equal-sized parts. Find a common denominator, rewrite each fraction without changing its value, then add only the numerators. For 5/8 + 1/6, the least common denominator is 24. Rewriting gives 15/24 + 4/24, so the exact sum is 19/24. Adding the denominators would change the size of the parts and give the wrong result.
The worked table uses the least common multiple of the reduced denominators. Multiplying both denominators is another valid route, but can produce a larger intermediate fraction. The visual comparison uses equal-sized wholes, with common partitions when a reasonably small common denominator is available. It illustrates the values; the table explains the operation.
How do I subtract fractions and keep the sign correct?
Subtraction follows the same common-denominator process. For 5/6 − 1/4, use twelfths: 10/12 − 3/12 = 7/12. If the second value is larger, the result is negative. Reversing the inputs changes the sign, so 1/4 − 5/6 = −7/12.
A minus sign can be attached to the numerator, the denominator or the whole fraction. The calculator normalizes the answer to a positive denominator, so 2/−4 becomes −1/2. Two negative signs cancel: −2/−4 is 1/2. This sign normalization happens before the arithmetic and does not change the value.
How do I multiply fractions without making large intermediate numbers?
Multiply the numerators and multiply the denominators: (a/b) × (c/d) = ac/bd. You do not need a common denominator. Matching numerator and denominator factors can be canceled before multiplication because dividing both by the same nonzero factor preserves the product.
For 3/5 × 10/9, cancel a factor of 5 between 10 and 5, and a factor of 3 between 3 and 9. The remaining product is (1 × 2)/(1 × 3) = 2/3. The worked table shows cross-cancellation explicitly. It also preserves exact integer arithmetic when the entered numerators or denominators are too large for ordinary floating-point numbers.
Why do I flip the second fraction when dividing?
Dividing by a nonzero fraction is equivalent to multiplying by its reciprocal. For 2/3 ÷ 4/5, keep the first fraction and multiply by 5/4. The product is 10/12, which reduces to 5/6. Only the second fraction is inverted; flipping both operands would solve a different problem.
The second fraction cannot be zero, even when its denominator is valid. Thus division by 0/5 is rejected. By contrast, 0/5 divided by 2/3 is zero. Convert a mixed number to one fraction before taking its reciprocal; the reciprocal of 2 1/2 is 2/5.
How do I calculate with mixed numbers such as −2 3/4?
A mixed number combines a whole magnitude and a fractional part. Multiply the whole part by the denominator, add the numerator, and then apply any leading minus sign. The input −2 3/4 therefore means −(2 + 3/4) = −11/4, rather than −2 + 3/4. Even −0 1/2 is interpreted as −1/2.
Select Mixed number arithmetic to enter values such as −2 3/4 and 3 5/7 directly. Their sum is 27/28. You may also enter an ordinary fraction or integer in either field. A mixed fractional part with a numerator larger than its denominator is normalized; the mixed form requires a positive denominator. The final answer is shown as an exact fraction and, when useful, a mixed or whole number.
To turn an improper fraction back into a mixed number, divide the numerator’s magnitude by the denominator. For −11/4, the quotient is 2 and the remainder is 3, giving −2 3/4. If the remainder is zero, the value is a whole number. The numerator’s sign applies to the entire mixed result.
How do I simplify a fraction to its lowest terms?
Divide the numerator and denominator by their greatest common factor. For 84/126, the greatest common factor is 42, so the reduced fraction is 2/3. Both parts are divided by the same factor; the value is unchanged. Reduction does not mean rounding or making the fraction smaller in magnitude.
The simplify mode also accepts a mixed number. For 2 21/98, conversion to an improper fraction gives 217/98. Dividing both terms by 7 gives 31/14, or 2 3/14. The calculation table shows the actual common factor and the resulting equivalent fraction. A denominator is kept positive so the location of the minus sign stays consistent.
How do I convert a decimal to a fraction exactly?
A finite decimal represents an exact fraction based on powers of ten. For 1.375, write 1375/1000 and reduce by 125 to obtain 11/8, or 1 3/8. For −0.125, write −125/1000 and reduce to −1/8. Scientific notation is also supported: 1.2e−3 represents 0.0012, or 3/2500; type an ordinary hyphen for the exponent in the input.
Every digit you enter matters. A finite 0.333 is exactly 333/1000 and is not silently changed to 1/3. If a measurement was rounded before you typed it, the calculator cannot recover the unknown original value. Decimal-to-fraction conversion describes the supplied number, not the precision of a measuring instrument.
How do repeating decimals become fractions?
Use parentheses to identify a repeating block: 0.(3) means 0.333… indefinitely, while 0.1(6) means 0.1666… indefinitely. For a block of k repeating digits, the conversion uses a denominator factor of 10^k − 1, together with a power of ten for any non-repeating prefix. Thus 0.(3) = 3/9 = 1/3, and 0.1(6) = 15/90 = 1/6.
The calculator does not infer repetition from an unmarked string such as 0.333...; identify the repeating digits explicitly. Repeating nines are handled algebraically: 0.(9) equals 1 exactly, so it reduces to 1/1. Parentheses describe infinite repetition, rather than uncertainty or a digit count.
Will a fraction terminate or repeat as a decimal?
First reduce the fraction. Its decimal terminates when the positive denominator has no prime factors other than 2 and 5. Otherwise its decimal repeats. For example, 3/8 = 0.375 terminates, 1/6 = 0.1(6) repeats after a non-repeating prefix, and 2/7 = 0.(285714) repeats a six-digit block.
The decimal expansion is calculated by long division and repeated-remainder detection. A repeated remainder identifies a complete cycle. The preview stops after 200 decimal places: if a complete ending or cycle has not yet been reached, an ellipsis marks the unfinished expansion. A terminating fraction can also need more than 200 places, so the label distinguishes the type of decimal from whether its preview is complete.
The separate Numeric approximation disclosure contains an ordinary floating-point value for compatibility. It may be rounded, underflow or exceed the machine-number range. It is not used for the exact fraction, mixed number or worked steps. Use the exact fraction whenever a decimal preview ends in an ellipsis.
When is a fraction calculator useful for recipes, measurements or study?
Use exact fractions when the quantities are supplied in fractional units. Scaling 1 1/2 cups by 3/4 gives 9/8 cups, or 1 1/8 cups. The multiplication describes recipe scaling; it does not establish the density or weight of the ingredient. For measurements, express the operands in the same unit before adding or subtracting.
For homework or checking a manual calculation, compare the common denominator, cross-cancellation, sign and reduction steps rather than copying only the final number. If two answers look different, reduce both: 6/8 and 3/4 are equal, whereas the rounded decimal 0.667 is not exactly 2/3. The reference examples below let you load a reproducible problem into the tool.
Can I calculate fractions with very large numerators?
All fraction integer fields support up to 200 digits per integer component and use integer arithmetic. You do not need a separate big-number form. For example, 9007199254740993/9007199254740992 − 1/9007199254740992 is exactly 1. A system that rounds the first numerator to a nearby machine integer before calculating would answer a different question.
When calling the calculation API, send large integers as quoted strings. Unsafe numeric integers are rejected before they can be converted to text; text cannot recover digits that were already rounded by a JSON parser. Inputs omit thousands separators, and resource limits are stated instead of describing the tool as unlimited. Complete text and CSV exports preserve exact fraction strings.
Fraction operation rules and examples
All original denominators must be nonzero. Equivalent common denominators and cross-cancellation can reduce intermediate work.
| Operation | Rule | Worked example |
|---|---|---|
| Add | a/b + c/d = (ad + bc)/(bd) | 5/8 + 1/6 = 19/24 |
| Subtract | a/b − c/d = (ad − bc)/(bd) | 5/6 − 1/4 = 7/12 |
| Multiply | (a/b) × (c/d) = ac/(bd) | 3/5 × 10/9 = 2/3 |
| Divide | (a/b) ÷ (c/d) = ad/(bc), with c ≠ 0 | 2/3 ÷ 4/5 = 5/6 |
| Simplify | Divide both terms by gcd(|numerator|, denominator) | 84/126 = 2/3 |
| Mixed to improper | Apply the leading sign to whole × denominator + numerator | −2 3/4 = −11/4 |
| Add | a/b + c/d = (ad + bc)/(bd) | 5/8 + 1/6 = 19/24 |
| Subtract | a/b − c/d = (ad − bc)/(bd) | 5/6 − 1/4 = 7/12 |
| Multiply | (a/b) × (c/d) = ac/(bd) | 3/5 × 10/9 = 2/3 |
| Divide | (a/b) ÷ (c/d) = ad/(bc), with c ≠ 0 | 2/3 ÷ 4/5 = 5/6 |
| Simplify | Divide both terms by gcd(|numerator|, denominator) | 84/126 = 2/3 |
| Mixed to improper | Apply the leading sign to whole × denominator + numerator | −2 3/4 = −11/4 |
Common fractions, decimals and percentages
Digits in parentheses repeat indefinitely. These are exact rational conversions, not rounded decimal approximations. A percentage is the fraction multiplied by 100.
| Reduced fraction | Exact decimal notation | Percentage |
|---|---|---|
| 1/8 | 0.125 | 12.5% |
| 1/6 | 0.1(6) | 16.(6)% |
| 1/5 | 0.2 | 20% |
| 1/4 | 0.25 | 25% |
| 2/7 | 0.(285714) | 28.(571428)% |
| 1/3 | 0.(3) | 33.(3)% |
| 3/8 | 0.375 | 37.5% |
| 1/2 | 0.5 | 50% |
| 2/3 | 0.(6) | 66.(6)% |
| 3/4 | 0.75 | 75% |
| 7/8 | 0.875 | 87.5% |
| 1/1 | 1 | 100% |
| 1/8 | 0.125 | 12.5% |
| 1/6 | 0.1(6) | 16.(6)% |
| 1/5 | 0.2 | 20% |
| 1/4 | 0.25 | 25% |
| 2/7 | 0.(285714) | 28.(571428)% |
| 1/3 | 0.(3) | 33.(3)% |
| 3/8 | 0.375 | 37.5% |
| 1/2 | 0.5 | 50% |
| 2/3 | 0.(6) | 66.(6)% |
| 3/4 | 0.75 | 75% |
| 7/8 | 0.875 | 87.5% |
| 1/1 | 1 | 100% |
Formula and calculation method
Fractions a/b and c/d have nonzero denominators. Add/subtract using L=lcm(|b|,|d|), scaling the numerators to L. Multiply numerators and denominators; divide by the reciprocal of a nonzero second fraction.
Reduce by gcd(|numerator|,denominator), keeping the denominator positive. A leading sign on a mixed number applies to its whole magnitude: -2 3/4 = -(2 + 3/4).
Finite decimal digits represent an exact rational with a power-of-ten denominator. Parenthesized repeating digits use a factor 10^k − 1; no repeating pattern is guessed from rounded digits.
Decimal previews use long division with repeated-remainder detection, up to 200 decimal places. Parentheses indicate a complete repeating block; an ellipsis indicates an incomplete preview. The separate floating-point approximation can be rounded.
Scope and Limitations
- At most 200 digits per integer component; decimal input has at most 200 digits with a scientific exponent from -200 to 200. These are resource limits, not a claim of unlimited precision.
- Send large API integers as quoted strings. Unsafe numeric JSON integers are rejected before conversion to text. For exact decimal digits, quoted strings are recommended. Inputs do not accept thousands separators, arbitrary expressions or an unmarked ellipsis.
- Visual bars compare magnitudes using one common whole. Signs remain in labels. More than four wholes are omitted; partitions above 24 parts per whole are suppressed, with an explicit notice. A value comparison does not itself demonstrate the selected arithmetic operation.
Reference Sources
- OpenStax: Fraction arithmetic
- OpenStax: Mixed numbers
- OpenStax: Decimals and fractions
- Wolfram MathWorld: Decimal expansion
Frequently asked questions
How do I add fractions with unlike denominators?
Find a common denominator, rewrite both fractions using it, then add the numerators and reduce the result. This calculator uses the least common multiple of the reduced denominators.
Can I enter mixed numbers directly?
Yes. Select Mixed number arithmetic and enter an integer, a/b or whole a/b. A leading minus applies to the entire mixed number: -2 3/4 means -11/4.
How do I simplify a fraction?
Divide numerator and denominator by their greatest common factor and keep the denominator positive. Simplification preserves the value; it does not round it.
Is 0.333 the same fraction as one third?
No. A finite 0.333 is exactly 333/1000. Enter 0.(3) to specify an infinitely repeating 3, which equals 1/3.
What do parentheses or an ellipsis mean in a decimal result?
Parentheses identify a complete repeating block. An ellipsis means the preview stopped before a complete ending or repeating cycle was found, after at most 200 decimal places. Use the exact fraction for the full value.
Can a fraction have a negative denominator?
An ordinary fraction may have a negative denominator, but the result is normalized to a positive denominator with the sign in the numerator. Mixed number notation in this tool requires a positive fractional denominator.
Why can I not divide by a zero fraction?
A fraction with numerator zero represents zero when its denominator is nonzero. Division by that value is undefined, even though the fraction itself is valid.
How large can the fraction inputs be?
Each integer component accepts up to 200 digits. Large API integers must be quoted strings. Decimal input supports up to 200 digits and an exponent from -200 to 200. Exact fraction arithmetic is separate from the optional floating-point approximation.