Difference Rule Calculator

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

This Difference Rule Calculator differentiates terms that are subtracted from one another, and shows the working line by line. The derivative splits across the minus signs just as it does across plus signs, with each term handled separately and the signs kept as they were. Losing a minus sign is the usual mistake here. Following the same pattern every time keeps each sign attached to its own term.

Step-by-step method

  1. Set up the problem.
  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)\)
See Example 1 Hide Example 1

Problem

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

Approach

Step-by-step method

  1. Set up the problem.
  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.

Step 1

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

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

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

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

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

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\)
See Example 2 Hide Example 2

Problem

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

Approach

Step-by-step method

  1. Set up the problem.
  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.

Step 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

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

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

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

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

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

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\)

Example Problems

Click one to load it into the box and solve it.