Product Rule Calculator
Last updated: 7 August 2026
Reviewed by Gavin Meiring, Lead research and primary author · Doctoral Candidate (Corporate Governance) · Research and drafting assisted by AI
- The product rule appeared in Leibniz's founding calculus paper of 1684, in the form d(uv) = u dv + v du.
- Leibniz also discovered the generalised product rule for higher derivatives, whose coefficients form Pascal's triangle.
- The rule is easy to prove but famously easy to forget, which is why generations of calculus students chant 'first times the derivative of the second, plus second times the derivative of the first'.
Product Rule Calculator
The product rule calculator differentiates functions that are written as the product of two or more expressions, applying the product rule automatically and showing every step. It is designed for calculus students and anyone who needs to differentiate expressions such as x^2 * sin(x) or e^x * ln(x) without making sign errors. Enter your product of functions to get the derivative with full working.
How to Use the Product Rule Calculator
- Enter the first function u(x) in the first input field.
- Enter the second function v(x) in the second input field.
- Click Calculate to apply the product rule and find the derivative.
- Review the output, which shows u', v', and the combined result.
- For triple products, some calculators allow a third function input; group two factors first if only two inputs are available.
The Formula
For a function h(x) = u(x) * v(x), the product rule gives:
h'(x) = u'(x) * v(x) + u(x) * v'(x)
In plain English: differentiate the first function and multiply by the second, then add the first function multiplied by the derivative of the second. A common memory aid is "first times derivative of second plus second times derivative of first."
For three functions h(x) = u * v * w:
h'(x) = u'vw + uv'w + uvw'
Real-World Example
Find the derivative of h(x) = x^3 * e^x.
- Let u = x^3, so u' = 3x^2
- Let v = e^x, so v' = e^x
- Apply the product rule: h'(x) = 3x^2 * e^x + x^3 * e^x
- Factorise: h'(x) = x^2 * e^x * (3 + x)
The derivative is x^2 * e^x(3 + x). Factorising after applying the rule keeps the result clean and is good practice for spotting common factors in derivatives.
Combining the Product Rule with Other Rules
The product rule rarely appears in isolation. You will often need to combine it with the chain rule when one or both factors are themselves composite functions. For example, to differentiate x^2 * sin(3x), apply the product rule to get the two-term structure, then apply the chain rule to the sin(3x) factor to obtain the derivative 3cos(3x). Similarly, the quotient rule can be derived directly from the product rule by writing v(x) as [1/g(x)] and differentiating using the chain rule on the reciprocal.
Frequently Asked Questions
Why does the product rule have two terms? Because both functions are changing simultaneously. A small increase in x changes both u and v. The product rule captures the contributions from each factor changing independently, summing them to give the total rate of change.
Can I use the product rule for more than two functions? Yes. For a product of three functions uvw, differentiate each factor in turn while holding the others constant, then sum the three resulting terms. This extends to any number of factors.
What is a common mistake when applying the product rule? A frequent error is writing (uv)' = u'v' rather than u'v + uv'. Multiplying the two individual derivatives is incorrect. The two separate terms from the correct formula must be added together.
When should I use the product rule instead of expanding first? When expanding the product would create a long polynomial that is tedious to differentiate term by term. For non-polynomial factors like e^x or ln(x), expansion is impossible, so the product rule is always necessary.
Checking a product rule answer by expanding first
Brackets can be multiplied out before differentiating, and for polynomial factors that route always works. Doing it once by hand is a useful way to confirm what the rule is actually doing.
Take h(x) = (3x^2 + 2x)(x^4 - 5x). Expanding gives 3x^6 + 2x^5 - 15x^3 - 10x^2. Differentiating that polynomial term by term gives 18x^5 + 10x^4 - 45x^2 - 20x.
The product rule reaches the same place. Set u = 3x^2 + 2x and v = x^4 - 5x, so u' = 6x + 2 and v' = 4x^3 - 5.
The first term u'v is (6x + 2)(x^4 - 5x), which expands to 6x^5 + 2x^4 - 30x^2 - 10x. The second term uv' is (3x^2 + 2x)(4x^3 - 5), which expands to 12x^5 + 8x^4 - 15x^2 - 10x. Adding the two gives 18x^5 + 10x^4 - 45x^2 - 20x. Every coefficient matches the expansion route.
Two numeric points give a second check. At x = 1 the product is (3 + 2)(1 - 5) = -20, and the derivative is 18 + 10 - 45 - 20 = -37. At x = -2 the product is 208 and the derivative is -556. Enter the same coefficients into the calculator and both values should come back.
Four products and the derivative of each
The table lists four products with both factors, both derivatives, the combined result, and the value of the derivative at x = 2. That last column is the quickest way to test the calculator's output against working you have done yourself.
| u(x) | v(x) | u'(x) | v'(x) | h'(x) | h'(2) |
|---|---|---|---|---|---|
| x^2 | sin x | 2x | cos x | 2x sin x + x^2 cos x | 1.9726 |
| e^x | ln x | e^x | 1/x | e^x ln x + e^x / x | 8.8162 |
| sqrt(x) | x^2 + 1 | 1 / (2 sqrt x) | 2x | (5x^2 + 1) / (2 sqrt x) | 7.4246 |
| x + 1 | e^(2x) | 1 | 2e^(2x) | (2x + 3)e^(2x) | 382.1871 |
Row three catches people out, because the derivative of sqrt(x) written as 1 / (2 sqrt x) is where most sign errors appear. Row four needs the chain rule on e^(2x) before the product rule can be applied at all.
Applying the rule to three factors at once
For h(x) = x^2 sin x e^x, differentiate one factor at a time and hold the other two fixed. That gives three terms.
The first is u'vw, which is 2x sin x e^x. The second is uv'w, which is x^2 cos x e^x. The third is uvw', which is x^2 sin x e^x.
Collecting the common factor gives h'(x) = e^x (2x sin x + x^2 cos x + x^2 sin x), which tidies to e^x (x^2 (sin x + cos x) + 2x sin x).
At x = 1 that derivative is 8.3308. At x = 0 it is 0, which is what you would expect, since x^2 and sin x both vanish there and the remaining terms both carry a factor of x.
This shape generalises. The Leibniz identity states that the nth derivative of a product is a binomial sum of n + 1 terms, pairing each derivative of u with a complementary derivative of v. The ordinary product rule is the case where n = 1.
Deriving the quotient rule from the product rule
Write a quotient as a product by turning the denominator into a negative power. Then f/g becomes f g^(-1), and the product rule applies directly.
Differentiating f g^(-1) gives f' g^(-1) + f (-1) g^(-2) g'. Put the two terms over the common denominator g^2 and the result is (f' g - f g') / g^2, which is the quotient rule.
Take f = x^2 and g = x + 1. The quotient rule gives (2x (x + 1) - x^2) / (x + 1)^2, which simplifies to (x^2 + 2x) / (x + 1)^2. At x = 1 that is 3 / 4 = 0.75.
The product rule route agrees. With u = x^2 and v = (x + 1)^(-1), the derivative is 2x (x + 1)^(-1) + x^2 (-1)(x + 1)^(-2). Combining over (x + 1)^2 gives (2x (x + 1) - x^2) / (x + 1)^2, the same expression. Both routes give 0.75 at x = 1.
Deciding whether the product rule applies at all
Not every expression that contains a multiplication needs the product rule. The table separates the shapes that do from the shapes that need something else.
| Shape of the expression | Example | Rule that does the work |
|---|---|---|
| Constant multiplied by a function | 3x^2 | Power rule, constant carried through |
| Two functions multiplied | x^2 sin x | Product rule |
| Function of a function | sin(3x) | Chain rule |
| One function divided by another | x^2 / (x + 1) | Quotient rule, or the product rule on x^2 (x + 1)^(-1) |
| A composite multiplied by a function | x^2 e^(2x) | Product rule outside, chain rule inside |
The constant case is the one that wastes most exam time. A constant factor passes straight through a derivative, so 3x^2 differentiates to 6x and the product rule adds nothing.
What the calculator assumes about your input
- The rule is applied to the expression exactly as typed. A numeric factor passes through unchanged.
- The variable is read as x. Change the input field if your expression uses another letter.
- Coefficients stay as numbers. Roots and surds are not rationalised.
- Terms are collected but not factorised, unless a factored form is requested separately.
- Every factor has to be differentiable at the point you evaluate it. ln x requires x greater than zero.
- Any factor with a denominator excludes the points where that denominator is zero.
- The domain of the product is the intersection of the domains of the two factors.
The limit definition behind the product rule
The derivation starts from the limit definition of the derivative. Write the difference quotient for f(x)g(x), then add and subtract f(x + h)g(x) in the numerator.
Splitting the fraction into two parts and taking the limit of each gives f(x)g'(x) + g(x)f'(x). The leftover piece approaches zero because f is continuous at x.
The geometric reading is a rectangle. Let the sides be u(x) and v(x). A small change in x lengthens both sides, so the change in area is the sum of two thin strips, u'v and uv', plus a small corner piece that disappears in the limit.
Wolfram MathWorld states the identity as d/dx[f(x)g(x)] = f(x)g'(x) + g(x)f'(x) and derives it from the same limit argument. The Leibniz identity in the same reference extends the statement to higher order derivatives.
Also try these free tools: