Fraction Calculator Widget
Add a fraction calculator to your maths pages. Students enter fractions such as 3/4 or mixed numbers such as 1 1/2 and get the answer in lowest terms, as a mixed number and as an exact decimal with the repeating digits marked.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/fraction-calculator" title="Fraction Calculator by A2Z Tools" width="100%" height="470" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="fraction-calculator" data-height="470"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
Each input is read as an exact fraction: mixed numbers become improper fractions, and terminating decimals such as 0.75 become 75/100. The arithmetic uses whole-number (BigInt) maths, so even very long numerators stay exact. The result is reduced with the greatest common divisor, the sign is moved to the numerator, and the working line shows the common denominator step. The decimal form is found by long division and marks a repeating block in brackets, for example 13/6 = 2.1(6).
Calculation method
- a/b + c/d = (ad + bc) / bd; a/b - c/d = (ad - bc) / bd
- a/b x c/d = ac / bd; a/b / c/d = a/b x d/c
- Lowest terms: divide numerator and denominator by gcd(numerator, denominator)
- Mixed number: whole part = numerator div denominator, remainder over the denominator
Worked examples
Adding a mixed number and a fraction
Inputs: 1 1/2 + 2/3
Result: 13/6 = 2 1/6 = 2.1(6)
Working shown: 3/2 + 2/3 = 9/6 + 4/6 = 13/6 in lowest terms.
Dividing by a decimal
Inputs: 3/4 / 0.125
Result: 6
0.125 is read as exactly 1/8, and 3/4 x 8 = 6.
The classic floating-point trap
Inputs: 0.1 + 0.2
Result: 3/10 = 0.3 exactly
The decimals become 1/10 and 1/5 before adding, so none of the binary rounding that makes ordinary software print 0.30000000000000004 can creep in.
Limitations
- Two operands and one operation at a time; expressions such as 1/2 + 1/3 x 3/4 must be done step by step.
- Repeating decimals cannot be typed as input: 0.333 is read as exactly 333/1000, so enter 1/3 instead.
- No powers, roots or percentages of fractions, and inputs are limited to 70 characters each.
Where publishers use it
- Primary and middle-school maths worksheets and lesson pages
- Recipe sites where readers combine or scale fractional measures
- Woodworking and DIY guides that work in fractions of an inch
- Homeschooling resources that want the working, not just the answer
Questions
How do I enter a mixed number?
Type the whole number, a space and the fraction: 2 3/4. A negative mixed number is written -2 3/4 and means -(2 + 3/4).
Can I use decimals?
Yes, terminating decimals such as 0.75 or 1.2 are converted to exact fractions (3/4 and 6/5) before calculating.
What do the brackets in the decimal mean?
The digits in brackets repeat forever: 0.(142857) is 1/7 and 2.1(6) is 2.1666...
What happens with a zero denominator?
The widget refuses it with a message, because a fraction with denominator 0 is undefined. Dividing by a fraction equal to 0 is refused for the same reason.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Fraction Calculator https://a2z.tools/embed/fraction-calculator
<a href="https://a2z.tools/embed/fraction-calculator">A2Z Tools Fraction Calculator</a>
[A2Z Tools Fraction Calculator](https://a2z.tools/embed/fraction-calculator)
Fraction Calculator by A2Z Tools - https://a2z.tools/embed/fraction-calculator
Related widgets
-
X% of Y, X as a percent of Y, and the percentage change between two values.
-
A clean on-screen calculator with keyboard support, correct operator precedence and percent.
-
Trig in degrees or radians, logs, roots, powers, factorials, pi, e and Ans - typed or tapped.
-
Mean, median, mode, range, variance, standard deviation and quartiles of any list of numbers.
-
Credit-weighted GPA for a term, plus the new cumulative GPA when you add prior results.
-
The score you need on the final exam to reach a target grade, plus best and worst cases.