What Is a Fraction?
Wolfram MathWorld defines a fraction as a rational number expressed in the form a/b, where a is the numerator and b is the denominator. That single line covers more ground than it looks: it means every fraction is also a division waiting to happen, and that any number you can write as one integer over another — 3/4, 22/7, 5/1, 75/100 — is the same species of thing.
Numerator, Denominator, and the Line Between Them
The bar is a division sign. 3/4 is literally 3 ÷ 4, which is why entering 3/4 here and adding 0 returns the decimal 0.75. The denominator names the size of each piece; the numerator counts how many of those pieces you are holding. Change the top number and you change the count. Change the bottom number and you change what you are counting.
That is the source of the one genuinely counter-intuitive thing about fractions: a larger denominator makes a smaller number. 1/16 returns 0.0625 and 1/8 returns 0.125, so the sixteenth is half the eighth even though 16 is twice 8. Cut a pizza into more slices and each slice shrinks. Every mistake people make when comparing fractions traces back to forgetting that the denominator runs backwards.
Proper, Improper, Mixed and Whole
A proper fraction is smaller than 1, meaning the numerator is less than the denominator. An improper fraction is 1 or larger — 7/4 is four quarters plus three more. A mixed number splits that improper fraction into its whole part and its remainder, written 1 3/4. All three are notation, not different kinds of number: 7/4 and 1 3/4 are the same quantity written two ways, and this calculator accepts either.
| Form | Typed as | Headline answer | Improper | Decimal |
|---|---|---|---|---|
| Proper fraction | 7/8 | 7/8 | 7/8 | 0.875 |
| Improper fraction | 7/4 | 1 3/4 | 7/4 | 1.75 |
| Mixed number | 1 3/4 | 1 3/4 | 7/4 | 1.75 |
| Whole number | 5 | 5 | 5/1 | 5 |
| Decimal | 0.75 | 3/4 | 3/4 | 0.75 |
Read the second and third rows together and the display convention becomes clear: whatever you type, an answer of 1 or more comes back as a mixed number in the headline and as an improper fraction on the line below. You are never forced to pick a format on the way in or stuck with one on the way out.
MathWorld notes a caveat about the mixed form worth knowing before you write one down: n r/s is standard in cooking and carpentry, but mathematicians avoid it because juxtaposition normally signals multiplication, so 1 1/2 can be misread as 1 × 1/2 rather than 1 + 1/2. In algebra, use the improper form.
Equivalent Fractions and Lowest Terms
Multiply the top and bottom of a fraction by the same number and its value does not move: 3/4, 6/8, 12/16 and 75/100 are one number in four disguises. Going the other way is called reducing, and MathWorld defines a reduced fraction as one written in lowest terms by dividing numerator and denominator by their greatest common divisor. That is exactly the last step this calculator performs, every time, without being asked.
You can see it work by adding zero to any fraction. Enter 6/8 and it comes back 3/4, with the working 6/8 = 3/4 after dividing top and bottom by 2. Enter 12/16 and the same 3/4 appears, this time after dividing by 4. Enter 4/6 and you get 2/3 after dividing by 2. Adding 0 is the fastest way to use this page as a plain simplifier.
The number being divided out is the greatest common factor of the two terms, and if you want to see that step on its own — or find the GCF of numbers that are not part of a fraction — use the GCF Calculator.
How Do You Calculate Fractions?
Four rules cover every fraction problem, and all four end the same way: whole-number arithmetic on the tops and bottoms, then one reduction by the greatest common divisor. Nothing else is going on, which is why fractions are more a bookkeeping exercise than a mathematical one.
The Four Formulas, Written Out
With two fractions a/b and c/d, these are the complete rules. Addition and subtraction need a common denominator, which the cross-multiplication builds. Multiplication goes straight across. Division flips the second fraction and multiplies.
Add a/b + c/d = (a·d + b·c) / (b·d) Subtract a/b − c/d = (a·d − b·c) / (b·d) Multiply a/b × c/d = (a·c) / (b·d) Divide a/b ÷ c/d = (a·d) / (b·c)
The common denominator these formulas produce is b·d, the plain product of the two denominators. That is always a valid common denominator, but it is not always the smallest one, which is why the raw answer so often needs reducing afterwards. The calculator takes that route deliberately: one rule that always works beats a shortcut that sometimes does.
Adding and Subtracting, Step by Step
Two fractions can only be added when their pieces are the same size. Rewriting both over a shared denominator is the whole job; the addition itself is trivial once that is done.
- Convert anything that is not already a simple fraction: a mixed number becomes improper, a whole number gets a denominator of 1, a decimal becomes tenths, hundredths or thousandths.
- Multiply each numerator by the other fraction's denominator — a·d and b·c. Both fractions now sit over the same b·d.
- Add or subtract the two new numerators. The denominator does not change.
- Divide the numerator and the denominator by their greatest common divisor.
- If the answer is 1 or more, split it back into a whole part and a remainder to read it as a mixed number.
Run 1/2 + 1/4 and the working line reads 6/8 = 3/4 after dividing top and bottom by 2. By hand you would probably use 4 as the common denominator and write 2/4 + 1/4 = 3/4 in one step. Same answer, smaller numbers — the calculator simply does not stop to look for the least common denominator first.
The gap widens when the denominators share a factor. 5/6 − 1/3 comes back as 9/18 = 1/2 after dividing top and bottom by 9. Using the least common denominator of 6, the hand version is 5/6 − 2/6 = 3/6, which reduces to the same 1/2. Both are correct; the second is just easier to carry in your head.
Multiplying and Dividing, Step by Step
These two need no common denominator at all, which makes them the easier pair despite their reputation. Multiplication is a single pass across the top and across the bottom.
- Convert both values to improper fractions, exactly as for addition.
- To multiply, multiply the numerators together and the denominators together: 2/3 × 3/4 = 6/12.
- To divide, flip the second fraction and multiply by it instead. The reciprocal of 3/4 is 4/3, so 2/3 ÷ 3/4 becomes 2/3 × 4/3 = 8/9.
- Reduce by the greatest common divisor as before. 6/12 comes back as 1/2 after dividing by 6; 8/9 has nothing to divide out and is printed as it stands.
Multiplying by a fraction below 1 always shrinks a number, which matches the everyday meaning of the word "of": 2/3 of 3/4 is 1/2, and 3/4 of 96 is 72. This is the one place where the arithmetic and the intuition line up without effort.
Division is where they part company. Dividing by a number below 1 makes the answer bigger — 1/2 ÷ 1/4 returns 2, because the real question is how many quarters fit into a half. On the same logic 3/4 ÷ 1/8 returns 6, and 2/3 ÷ 3/4 returns 8/9, which is 0.888889 against the 0.666667 you started with.
Worked Example: 1 3/4 + 7/8
This is the pair loaded into the fields by default, so it is also the calculation the page runs before you touch anything. Every intermediate value below appears somewhere in the result panel.
Convert 1 3/4 = (1 × 4 + 3)/4 = 7/4 Cross-multiply 7/4 + 7/8 = (7 × 8 + 4 × 7) / (4 × 8) = 84/32 Reduce gcd(84, 32) = 4, so 84/32 = 21/8 Split 21 ÷ 8 = 2 remainder 5, so 21/8 = 2 5/8 Decimal 21 ÷ 8 = 2.625
- What the result panel returns
- 2 5/8 · improper 21/8 · decimal 2.625
The fourth line of the panel prints the whole chain in one string: 1 3/4 + 7/8 = 84/32 = 21/8 after dividing top and bottom by 4 = 2 5/8. If your homework has to show working, that line is the working.
Sanity-check it against the decimals before you write it down. 1 3/4 is 1.75 and 7/8 is 0.875, so the answer has to be a shade over 2.6 — which 2.625 is. Any fraction result you cannot confirm to within a tenth in decimal form is worth re-entering.
What the Calculator Converts Before It Starts
Nothing is calculated in the form you typed it. Each field is parsed into a numerator and a denominator first, and the operation runs on those integers. Knowing what each format becomes explains most of what you see in the working line.
| You type | Read as | How |
|---|---|---|
| 1 3/4 | 7/4 | (1 × 4 + 3)/4 — whole part times denominator, plus numerator |
| -2 1/2 | -5/2 | the sign applies to the whole quantity, so -2 1/2 + 1/2 returns -2 |
| 5 | 5/1 | a whole number gets a denominator of 1 |
| 0.75 | 3/4 | 75/100, then reduced by 25 |
| 0.125 | 1/8 | 125/1000, then reduced by 125 |
| 0.123456 | 1929/15625 | 123456/1000000, then reduced by 64 — six places is the maximum |
Because a decimal becomes a power of ten, decimal inputs can make the working line look alarming. Add 0.125 and 0.375 and the panel reports 1/8 + 3/8 = 500000/1000000 = 1/2 after dividing top and bottom by 500000. The half-million is just 1000 × 1000 from the cross-multiplication, and the reduction takes it straight back out.
Fractions typed with spaces around the slash are fine — 7 / 8 parses exactly like 7/8 — and leading or trailing spaces are trimmed. What is not accepted is a plus sign in front of a number, a comma as a decimal point, a typographic glyph like ½, or a minus sign on the denominator.
Fraction Examples for All Four Operations
Every figure in the tables below came out of the calculator at the top of this page, including the working column. They are worth reading as a set, because the pattern of when a result needs reducing and when it does not is not obvious until you see a dozen of them side by side.
One Example of Each Operation
| Problem | Answer | Improper | Decimal | Working line |
|---|---|---|---|---|
| 1/2 + 1/4 | 3/4 | 3/4 | 0.75 | 6/8 = 3/4 after dividing by 2 |
| 3/4 + 2/3 | 1 5/12 | 17/12 | 1.416667 | 17/12, nothing to divide out |
| 5/6 − 1/3 | 1/2 | 1/2 | 0.5 | 9/18 = 1/2 after dividing by 9 |
| 3/4 − 2/3 | 1/12 | 1/12 | 0.083333 | 1/12, nothing to divide out |
| 2/3 × 3/4 | 1/2 | 1/2 | 0.5 | 6/12 = 1/2 after dividing by 6 |
| 1 3/4 × 7/8 | 1 17/32 | 49/32 | 1.53125 | 49/32, nothing to divide out |
| 2/3 ÷ 3/4 | 8/9 | 8/9 | 0.888889 | 8/9, nothing to divide out |
| 1/2 ÷ 1/4 | 2 | 2/1 | 2 | 4/2 = 2/1 after dividing by 2 |
Two rows deserve a second look. 3/4 + 2/3 and 3/4 − 2/3 both land on a denominator of 12 because 4 and 3 share no factors, so b·d is already the least common denominator and no reduction happens. And in the last row the answer, 2, is larger than either number that went into it — the standard result of dividing by something smaller than 1.
Mixed Numbers, Whole Numbers and Decimals in the Same Problem
The two fields are independent, so nothing stops you putting a mixed number against a decimal or a whole number against a fraction. Each is converted on its own terms before the operation runs.
| Problem | Answer | Decimal |
|---|---|---|
| 1 3/4 + 7/8 | 2 5/8 | 2.625 |
| 2 1/4 + 1 7/8 | 4 1/8 | 4.125 |
| 8 1/2 − 1 3/4 | 6 3/4 | 6.75 |
| 1 1/8 − 3/4 | 3/8 | 0.375 |
| 2 1/2 × 4 | 10 | 10 |
| 96 × 3/4 | 72 | 72 |
| 3 1/2 ÷ 1/4 | 14 | 14 |
| 0.75 + 1/4 | 1 | 1 |
| 1.5 × 2/3 | 1 | 1 |
| -2 1/2 + 1/2 | -2 | -2 |
The 0.75 + 1/4 row is the one to remember when you are checking someone else's work. It returns exactly 1, not 0.999999, because the decimal was turned into 3/4 before anything was added. A decimal calculator would have given you the same answer here and a rounding artifact somewhere else.
Scaling a Recipe Up and Down
Halving is division by 2 and doubling is multiplication by 2, with the whole number going in the second field. This is where fractions get used most often outside a classroom, and where the awkward cases show up fastest: two thirds of a cup does not halve into anything you own a measuring spoon for.
| Job | Entered as | Answer | Decimal |
|---|---|---|---|
| Halve 1 3/4 cups | 1 3/4 ÷ 2 | 7/8 | 0.875 |
| Halve 2/3 cup | 2/3 ÷ 2 | 1/3 | 0.333333 |
| Triple 3/4 cup | 3/4 × 3 | 2 1/4 | 2.25 |
| Scale 1 1/2 cups by one and a half | 1 1/2 × 1 1/2 | 2 1/4 | 2.25 |
| Combine 2 1/4 and 1 7/8 cups | 2 1/4 + 1 7/8 | 4 1/8 | 4.125 |
| Three quarters of a 96 oz batch | 96 × 3/4 | 72 | 72 |
Half of 2/3 cup is 1/3 cup, which is a measure you actually have. Half of 1 3/4 is 7/8, which is not — you would measure 3/4 plus 1/8, and the calculator confirms that pair adds back to 7/8. Fractions like these are the reason recipe halving goes wrong: the arithmetic is easy, the measuring is not.
For scaling a whole ingredient list at once, or moving between cups, grams and milliliters rather than between fractions, use the Recipe Conversion Calculator.
Sixteenths, Eighths and Workshop Arithmetic
Tape measures, drill bits, plywood and hardware are all sized in halves, quarters, eighths, sixteenths and thirty-seconds, which means the arithmetic almost always involves two different denominators. These are the calculations that go wrong on a saw bench.
| Problem | Answer | Decimal inch |
|---|---|---|
| 5/8 − 9/16 | 1/16 | 0.0625 |
| 1 1/8 − 3/4 | 3/8 | 0.375 |
| 9/16 + 3/32 | 21/32 | 0.65625 |
| 1 3/4 ÷ 7/8 | 2 | 2 |
| 3/4 ÷ 1/8 | 6 | 6 |
The last two rows are the same question in two guises: how many of the smaller size fit inside the larger one. Two 7/8 pieces make 1 3/4, and six 1/8 pieces make 3/4. Any time you need a count rather than a length, division is the operation you want, and the answer coming back as a whole number is the confirmation that it divided evenly.
Fraction Chart: Decimals, Percents and Sixteenths
Perhaps thirty fractions account for nearly everything anyone meets in ordinary life. Knowing what they equal as decimals removes the calculator from the loop for most of them and, more usefully, gives you a way to notice when an answer is wrong.
Common Fractions as Decimals and Percents
The decimal column is what this calculator returns when you add 0 to each fraction; the percent column is what it returns when you multiply each one by 100.
| Fraction | Decimal | Percent |
|---|---|---|
| 1/2 | 0.5 | 50% |
| 1/3 | 0.333333 | 33 1/3% |
| 2/3 | 0.666667 | 66 2/3% |
| 1/4 | 0.25 | 25% |
| 3/4 | 0.75 | 75% |
| 1/5 | 0.2 | 20% |
| 2/5 | 0.4 | 40% |
| 3/5 | 0.6 | 60% |
| 4/5 | 0.8 | 80% |
| 1/6 | 0.166667 | 16 2/3% |
| 5/6 | 0.833333 | 83 1/3% |
| 1/8 | 0.125 | 12 1/2% |
| 3/8 | 0.375 | 37 1/2% |
| 5/8 | 0.625 | 62 1/2% |
| 7/8 | 0.875 | 87 1/2% |
| 1/10 | 0.1 | 10% |
| 1/12 | 0.083333 | 8 1/3% |
| 1/16 | 0.0625 | 6 1/4% |
Multiplying by 100 is worth knowing as a trick in its own right. Enter 3/8 against 100 and the headline reads 37 1/2 with 37.5 on the decimal line, so 3/8 is 37.5%. Enter 1/3 against 100 and you get 33 1/3 with 33.333333 below it — the exact answer and its rounded decimal, one above the other.
To go the other way, or to work out a percentage of an amount rather than convert one, use the Percentage Calculator.
Every Sixteenth of an Inch, Reduced and in Millimeters
The reduced column is what appears when you add 0 to each fraction; the millimeter column is what appears when you multiply it by 25.4.
| Sixteenths | Lowest terms | Decimal inch | Millimeters |
|---|---|---|---|
| 1/16 | 1/16 | 0.0625 | 1.5875 |
| 2/16 | 1/8 | 0.125 | 3.175 |
| 3/16 | 3/16 | 0.1875 | 4.7625 |
| 4/16 | 1/4 | 0.25 | 6.35 |
| 5/16 | 5/16 | 0.3125 | 7.9375 |
| 6/16 | 3/8 | 0.375 | 9.525 |
| 7/16 | 7/16 | 0.4375 | 11.1125 |
| 8/16 | 1/2 | 0.5 | 12.7 |
| 9/16 | 9/16 | 0.5625 | 14.2875 |
| 10/16 | 5/8 | 0.625 | 15.875 |
| 11/16 | 11/16 | 0.6875 | 17.4625 |
| 12/16 | 3/4 | 0.75 | 19.05 |
| 13/16 | 13/16 | 0.8125 | 20.6375 |
| 14/16 | 7/8 | 0.875 | 22.225 |
| 15/16 | 15/16 | 0.9375 | 23.8125 |
| 16/16 | 1 | 1 | 25.4 |
The millimeter figures are exact rather than rounded. NIST lists the international foot as exactly 0.3048 meters, which puts exactly 25.4 millimeters in an inch, so 1/2 inch is 12.7 mm on the nose and 1/16 inch is 1.5875 mm. Every sixteenth of an inch converts to a terminating decimal in millimeters, which is a small piece of luck the imperial and metric systems did not have to grant us.
Fractions That Never Finish as Decimals
A fraction in lowest terms converts to a terminating decimal only when its denominator is built from the primes 2 and 5 — the two prime factors of ten. Halves, quarters, fifths, eighths, tenths, sixteenths and thirty-seconds all stop. Anything with a 3, 7, 9, 11 or 13 in the denominator repeats forever.
| Fraction | What the decimal line shows | What it truly is |
|---|---|---|
| 1/8 | 0.125 | 0.125, exactly |
| 1/3 | 0.333333 | 0.3 repeating |
| 2/3 | 0.666667 | 0.6 repeating, rounded up at the sixth place |
| 1/6 | 0.166667 | 0.16 with the 6 repeating |
| 1/7 | 0.142857 | 142857 repeating with a period of six |
| 1/12 | 0.083333 | 0.083 with the 3 repeating |
| 8/9 | 0.888889 | 0.8 repeating, rounded up at the sixth place |
The decimal line is rounded to six places, which is why 2/3 appears as 0.666667 with a 7 on the end that is not really there. The fraction line has no such problem — 2/3 is 2/3, exactly, forever. That is the entire argument for keeping fractional form through a calculation and converting to a decimal only at the finish.
Add 1/3 to 1/3 here and the answer is 2/3, not 0.66666667. Add 1/3 three times, in two steps, and you land on exactly 1. A decimal-only tool cannot promise that, because 0.333333 × 3 is 0.999999 and no amount of extra digits closes the gap.
Which Fraction Is Bigger?
The classroom method is cross-multiplication: to compare 1/3 with 1/4, multiply 1 by 4 and 1 by 3, and since 4 beats 3 the first fraction wins. It works, but it only ever answers which, never by how much. Subtracting the two fractions here answers both at once — the sign tells you which is larger and the result is the exact gap.
| Pair | Entered as | Result | Reading |
|---|---|---|---|
| 1/3 vs 1/4 | 1/3 − 1/4 | 1/12 | 1/3 is larger, by 1/12 |
| 3/4 vs 2/3 | 3/4 − 2/3 | 1/12 | 3/4 is larger, by 1/12 |
| 5/8 vs 9/16 | 5/8 − 9/16 | 1/16 | 5/8 is larger, by 1/16 |
| 1/2 vs 3/4 | 1/2 − 3/4 | -1/4 | negative, so 3/4 is larger |
| 2/3 vs 2/3 | 2/3 − 2/3 | 0 | identical |
The first two rows are a useful pairing: two completely different-looking comparisons that happen to differ by the same 1/12. Cross-multiplication would have told you which was bigger in each case and left you with no way to see that the gaps matched.
How to Read Your Result
There are no bands or categories to interpret on this page — the answer is the answer. What the panel adds is three further views of it, and the fourth line in particular is doing work that most fraction calculators leave out.
The Four Lines the Panel Returns
Taking the default calculation, 1 3/4 + 7/8, line by line:
| Line | Shows | What it is for |
|---|---|---|
| Headline | 2 5/8 | the answer in lowest terms, as a mixed number whenever it is 1 or more |
| As an improper fraction | 21/8 | the form you need to carry into another calculation, or into algebra |
| As a decimal | 2.625 | the sanity check, and the form a tape measure or a spreadsheet wants |
| Working line | 1 3/4 + 7/8 = 84/32 = 21/8 after dividing top and bottom by 4 = 2 5/8 | the arithmetic, for copying onto homework or for finding where you went wrong |
The improper line always appears, even when the answer is a whole number: 1/2 ÷ 1/4 shows a headline of 2 and an improper form of 2/1. That is not an error, it is the same number with its denominator left visible.
What "after dividing top and bottom by 4" Means
Adding 1 3/4 and 7/8 by cross-multiplication produces 84/32. The greatest common divisor of 84 and 32 is 4, so both numbers are divided by it to give 21/8 — the same value with nothing left in common. That phrase in the working line is naming the number that was divided out, which is the step people most often skip by hand and the reason so much homework comes back marked for an unreduced answer.
When there is nothing to divide out, the phrase does not appear at all. 3/4 + 2/3 goes straight to 17/12 and 2/3 ÷ 3/4 straight to 8/9, because in both cases the numerator and denominator were already coprime.
The number quoted can look absurd without being wrong. Add 0.75 and 1/4 and the line reads 3/4 + 1/4 = 400/400 = 1/1 after dividing top and bottom by 400. The 400 is just the two denominators multiplied out after the decimal became 75/100; the answer is 1.
Why the Working Line May Not Repeat What You Typed
The working line echoes each input in its reduced form rather than as you entered it. Type 2/4 + 2/8 and the line begins 1/2 + 1/4, because both were simplified before the addition. Type 0.75 and it appears as 3/4. Type 22/7 and it appears as 3 1/7.
The parser is also more forgiving than the placeholder suggests. Spaces around the slash are accepted, so 7 / 8 and 1 3 / 4 both work, and any leading or trailing spaces are trimmed. What you see echoed back is the calculator's reading of your input, so a line that does not match what you meant is the fastest way to catch a typo before you trust the answer.
When You Get "Check Your Inputs" Instead
Two things stop the calculation, and each returns a specific message rather than a wrong number. An unreadable field returns "Enter the first fraction as 3/4, 1 3/4, or 5" — or the second, naming whichever field failed. Dividing by a value of zero returns "Cannot divide by zero".
- A denominator of zero, such as 1/0, is unreadable rather than infinite, and is rejected as an input.
- A minus sign belongs on the numerator, not the denominator: 1/-2 is refused, while -1/2 works — enter -1/2 against 1/4 and you get -1/4.
- A leading plus sign is not accepted, so +3/4 fails where 3/4 succeeds.
- Only digits, a slash, a decimal point, a leading minus and separating spaces are understood. A comma decimal point (1,5), a typographic glyph (1½) and words (two thirds) are all refused.
- Decimals are capped at six places. 0.123456 is accepted and becomes 1929/15625; 0.1234567 is not.
- An empty field counts as unreadable rather than as zero, which is the right behavior — a blank box silently treated as 0 is how wrong answers look convincing.
- Dividing by 0 or by 0/5 both stop with the divide-by-zero message. Multiplying by zero does not: 3/4 × 0 returns 0, as it should.
Limits: When This Calculator Does Not Apply
The tool does one job — two rational numbers, one operation, an exact answer. Being precise about where that job ends is more useful than a longer list of things it can do.
- Two numbers at a time, and no order of operations. There is no way to enter 1/2 + 1/3 − 1/4 in one go. Run it in stages instead: 1/2 + 1/3 returns 5/6, then 5/6 − 1/3 returns 1/2, carrying each answer into the next calculation by hand.
- No variables and no algebra. It handles numbers, so x/4 + 1/2 is outside its scope, as is anything with a root or an exponent in it.
- Decimals are exact, not approximate. Typing 0.3333 does not mean one third; it means 3333/10000, and 0.3333 + 1/3 returns 19999/30000 rather than 2/3. If you mean a third, type 1/3.
- The decimal line is rounded to six places, so 2/3 reads 0.666667. The fraction lines above it are exact and should be the ones you quote.
- Decimal inputs stop at six places. Anything longer is rejected rather than silently truncated.
- It carries no units and no memory. 3/4 might be cups, inches or hours, and the calculator neither knows nor keeps the previous answer — mixing 3/4 of a cup with 3/4 of an inch is an error it cannot see.
- Whole numbers stay exact only up to 9,007,199,254,740,991, the largest integer JavaScript can represent reliably. Beyond it the arithmetic drifts: 9007199254740991 + 2 returns 9007199254740992, and 123456789012345678/2 is read as 123456789012345680/2. Nothing you would type on a homework sheet comes near this.
- The working line prints a negative second value literally, so subtracting -1/4 shows as 1/2 − -1/4 = 3/4. The double sign is cosmetic; the answer is right.
An improper fraction is not a limitation and not an error. Enter 22/7 and it will simply be shown as 3 1/7, and subtracting 3 from it returns 1/7 — which is also the neatest demonstration that 22/7 is a hair over pi rather than equal to it.