Fraction Calculator
Exact arithmetic on whole numbers, so nothing is lost to rounding. Working shown at every step.
Working
Accepts 3/4, 2 1/2, 7 and 0.75. A negative sign goes at the front.
Why the arithmetic is done on whole numbers
The obvious way to add a half and a third is to turn them into 0.5 and 0.3333 and add those. It gives 0.8333, which is close to five sixths and is not five sixths, and every further operation drifts a little further. Worse, it cannot tell you the answer as a fraction at all.
Here a fraction stays a pair of whole numbers from start to finish. A half and a third become three sixths and two sixths, which add to five sixths exactly. Nothing is rounded until the answer is displayed, and the decimal form shown alongside is derived from the exact fraction rather than the other way round.
This also fixes a familiar oddity. Typing 0.1 + 0.2 into most calculators gives 0.30000000000000004, because neither decimal can be stored exactly in binary. Typed here, 0.1 is read as one tenth, the addition is done on whole numbers, and the answer is exactly three tenths.
The four operations, in plain terms
| Operation | Method | Why |
|---|---|---|
| Add and subtract | Rewrite over a common denominator, then combine the numerators | A fraction counts parts of a given size, and only counts of the same size can be added |
| Multiply | Numerator times numerator, denominator times denominator | Taking two thirds of three quarters means splitting one quarter three ways and taking two |
| Divide | Flip the second fraction and multiply | Dividing asks how many of the second fit into the first, which flipping answers directly |
The common denominator used is the lowest one rather than the product of the two, which keeps the numbers small and usually means the answer needs no simplifying afterwards.
Input formats
| Type | Means |
|---|---|
3/4 | Three quarters |
2 1/2 | Two and a half, as a mixed number with a space |
7 | The whole number seven, which is seven over one |
0.75 | Converted to three quarters exactly |
-2/3 | Negative two thirds; the sign goes at the front |
How to use it
Type a value into each box, choose an operation, and the answer appears with the working underneath. The result is given simplified, and alongside it as a mixed number and as a decimal, so you can take whichever form the question wanted. A decimal that does not terminate is shown to nine places with the exact fraction remaining the authoritative answer.
Questions
Why do fractions need a common denominator to add?
Because a fraction counts parts of a particular size, and you can only add counts of the same size. Halves and thirds are different sizes, so they are first rewritten as sixths, and three of one and two of the other can then be counted together.
How do I divide by a fraction?
Turn the second fraction upside down and multiply. Dividing by two thirds is the same as multiplying by three halves, because dividing asks how many of the second fit into the first, and flipping it answers that directly.
What is a mixed number?
A whole number written alongside a fraction, such as 2 1/2. Type it with a space. Internally it becomes the improper fraction 5/2, since arithmetic is easier that way, and the answer is offered in both forms.
Why does 0.1 plus 0.2 work here when it fails on a calculator?
Because a decimal you type is converted to an exact fraction first: 0.1 becomes one tenth rather than the binary approximation a floating point number holds. The arithmetic then runs on whole numbers, so there is no rounding error to accumulate.
Is anything sent to a server?
No. The arithmetic runs inside your browser and this tool has no backend, so nothing you type is transmitted, logged or stored.
Related tools
Browse all Sigma Wire tools - every free tool on the site, grouped by category.