What this calculator does
This tool adds or subtracts two rational expressions — fractions whose numerator and denominator are polynomials in the variable x. It rewrites both fractions over a common denominator, combines the numerators, and reduces the answer to a single simplified rational expression. Each expression is entered as a ratio of linear terms, \(\frac{a x + b}{c x + d}\), which covers the forms most often seen in algebra: plain constants, single terms, and linear numerators and denominators.
How to use it
For the first expression, type the numerator as its x-coefficient a and constant b, then the denominator as its x-coefficient c and constant d. Choose Add or Subtract, then enter the second expression the same way. To enter a plain constant such as 5, set its x-coefficient to 0 and its constant to 5. The calculator returns the combined expression reduced to lowest terms, along with a table of the numerator and denominator coefficients (the x-squared, x, and constant parts).
The formula explained
Two fractions are combined by writing them over the product of their denominators (a common denominator) and adding or subtracting the cross-multiplied numerators:
$$\frac{a_1 x + b_1}{c_1 x + d_1} \pm \frac{a_2 x + b_2}{c_2 x + d_2} = \frac{(a_1 x + b_1)(c_2 x + d_2) \pm (a_2 x + b_2)(c_1 x + d_1)}{(c_1 x + d_1)(c_2 x + d_2)}$$When the two denominators are equal (or one is a constant multiple of the other) the calculator uses that single denominator instead of the product, so the answer stays in lowest terms. Any whole number that divides every coefficient of the numerator and denominator is then cancelled.
Worked example
Add \(\frac{3}{x+2}\) and \(\frac{5}{x-1}\). The denominators share no common factor, so the common denominator is their product, \((x+2)(x-1)\):
$$\frac{3}{x+2} + \frac{5}{x-1} = \frac{3(x-1) + 5(x+2)}{(x+2)(x-1)} = \frac{8x + 7}{x^2 + x - 2}$$The numerator expands to \(3x - 3 + 5x + 10 = 8x + 7\) and the denominator to \(x^2 + x - 2\). Because 8, 7, and the denominator coefficients share no common factor, the simplified answer is \(\frac{8x + 7}{x^2 + x - 2}\).
Frequently asked questions
Do the two denominators have to be the same? No. If they differ, the calculator multiplies them to form a common denominator, then combines the numerators. If they match or are proportional, it keeps the single denominator so the result is already in lowest terms.
Can x make a denominator equal zero? Yes, and those values are excluded from the domain. For instance, \(\frac{3}{x+2}\) is undefined at \(x = -2\). The simplified expression inherits the same restrictions as the original fractions.
Does it handle squared or higher-degree terms? Each expression you enter is a ratio of linear terms, but the combined answer can contain an x-squared term because multiplying two linear denominators gives a quadratic. Inputs that are themselves quadratic or higher are outside its scope.