Difference Rule Calculator

Published on: July 17, 2026
Final Answer: Free Full Steps: Plus

This Difference Rule Calculator helps you differentiate differences such as x^3 - x^2, 5x^2 - 3x, or x^2 - 7. The difference rule says that the derivative of a difference is the difference of the derivatives, so the derivative splits across the subtraction signs.

Step-by-step method

  1. Set up the terms in the difference.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. Combine the term derivatives and simplify.

Formula:

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Example 1:

\(f\left(x\right) = x^{3} - x^{2}\)

Step 1 - Set up the terms in the difference.

In this problem: We are given a difference. The separated terms are \(x^{3}\), \(x^{2}\).

\(f\left(x\right) = x^{3} - x^{2}\)

Step 2 - Write the difference rule formula.

In this problem: The difference rule says the derivative of a difference is the difference of the derivatives.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Step 3 - Split the derivative across the subtraction signs.

In this problem: Apply the derivative to each separated term, keeping each sign.

\(\frac{d}{dx}\left(x^{3} - x^{2}\right) = \frac{d}{dx}\left(x^{3}\right) - \frac{d}{dx}\left(x^{2}\right)\)

Step 4a - Differentiate the separated term \(x^{3}\).

In this problem: The separated term is \(x^{3}\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(x^{3}\right) = 3 x^{2}\)

Step 4b - Differentiate the separated term \(x^{2}\).

In this problem: The separated term is \(x^{2}\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(x^{2}\right) = 2 x\)

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 3 x^{2} - 2 x\)

Final answer:

\(f'\left(x\right) = 3 x^{2} - 2 x\)

Example 2:

\(f\left(x\right) = 5 x^{2} - 3 x + 1\)

Step 1 - Set up the terms in the difference.

In this problem: We are given a difference. The separated terms are \(5 x^{2}\), \(3 x\), \(1\).

\(f\left(x\right) = 5 x^{2} - 3 x + 1\)

Step 2 - Write the difference rule formula.

In this problem: The difference rule says the derivative of a difference is the difference of the derivatives.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Step 3 - Split the derivative across the subtraction signs.

In this problem: Apply the derivative to each separated term, keeping each sign.

\(\frac{d}{dx}\left(5 x^{2} - 3 x + 1\right) = \frac{d}{dx}\left(5 x^{2}\right) - \frac{d}{dx}\left(3 x\right) + \frac{d}{dx}\left(1\right)\)

Step 4a - Differentiate the separated term \(5 x^{2}\).

In this problem: The separated term is \(5 x^{2}\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(5 x^{2}\right) = 10 x\)

Step 4b - Differentiate the separated term \(3 x\).

In this problem: The separated term is \(3 x\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(3 x\right) = 3\)

Step 4c - Differentiate the separated term \(1\).

In this problem: The separated term is \(1\). Use the constant rule to get its derivative.

\(\frac{d}{dx}\left(1\right) = 0\)

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 10 x - 3 + 0 = 10 x - 3\)

Final answer:

\(f'\left(x\right) = 10 x - 3\)