Difference Quotient Calculator (Free)
CalculusFreeNo sign-up
The difference quotient is [f(x + h) − f(x)] / h. For f(x) = 2x² + 3x − 5, f(x + h) − f(x) = 4xh + 2h² + 3h, and dividing by h gives 4x + 2h + 3. As h → 0 it becomes 4x + 3, the derivative. The difference quotient calculator below expands, cancels and simplifies any polynomial, fraction or square root this way.
[f(x + h) − f(x)]/h for f(x) = 2x² + 3x − 5 simplifies to 4x + 2h + 3. Its limit as h → 0 is f′(x) = 4x + 3.
As h shrinks, the quotient approaches f′(1)
| h | [f(x + h) − f(x)]/h | Distance from f′(1) |
|---|---|---|
| 1 | 9 | 2 |
| 0.1 | 7.2 | 0.2 |
| 0.01 | 7.02 | 0.02 |
| 0.001 | 7.002 | 0.002 |
| 0.0001 | 7.0002 | 0.0002 |
| −0.001 | 6.998 | 0.002 |
Show steps
- Formulaf(x + h) − f(x)h, h ≠ 0
- Substitute x + h for xf(x + h) = 2(x + h)2 + 3(x + h) − 5f(x) = 2x2 + 3x − 5
- Expand the powers of (x + h)(x + h)2 = x2 + 2xh + h2
- So f(x + h) in expanded form is2x2 + 4xh + 3x + 2h2 + 3h − 5
- Subtractf(x + h) − f(x) = (2x2 + 4xh + 3x + 2h2 + 3h − 5) − (2x2 + 3x − 5) = 4xh + 2h2 + 3hEvery term without h cancels, so each remaining term has a factor h.
- Divide by h4xh + 2h2 + 3hh = h(4x + 2h + 3)h = 4x + 2h + 3
- Take the limit as h → 0Set h = 0 in 4x + 2h + 3: 4x + 3This is the derivative f′(x).
- EvaluateAt x = 1, h = 0.1: 7.2. The quotient is the slope of the secant line through the two points; the limit is the slope of the tangent line.
Check the limit: derivative calculator with steps · average rate of change · limit calculator
How to use the difference quotient calculator
- Pick the form your class uses: [f(x + h) − f(x)] / h, or [f(x) − f(a)] / (x − a) for the slope at a point a.
- Type the function, for example x^2 + 2x, 1/x, (x+1)/(x-2) or sqrt(x). The “Reads as” line shows how it was understood.
- Read the simplified quotient and its limit as h → 0 (or x → a), which is the derivative.
- Optionally enter numbers for x and h (or a and x). You get the value of the quotient, a table that shrinks h toward 0, and a graph of the secant line next to the tangent line.
- Open Show steps to see the substitution, the expansion, the cancellation and the division by h, one line at a time.
The difference quotient formula
Difference quotient = [f(x + h) − f(x)] / h, with h ≠ 0. The numerator is the change in output between x and x + h; the denominator is the change in input, h. So the quotient is the slope of the secant line through (x, f(x)) and (x + h, f(x + h)), the same idea as the average rate of change on [x, x + h].
The second form, [f(x) − f(a)] / (x − a), measures the slope between a fixed point a and a moving point x. Writing x = a + h turns one form into the other.
When h shrinks to 0 the secant line turns into the tangent line, and the limit of the quotient is the derivative: f′(x) = limh→0 [f(x + h) − f(x)] / h. You cannot set h = 0 before simplifying, because that gives 0/0. You first cancel the factor h, then let h → 0.
How to simplify a difference quotient
- Replace every x in f with (x + h) to get f(x + h). Keep the brackets.
- Expand, for example (x + h)² = x² + 2xh + h² and (x + h)³ = x³ + 3x²h + 3xh² + h³.
- Subtract f(x). Every term without h cancels.
- Factor h out of what is left and cancel it with the h in the denominator.
- For a fraction, combine f(x + h) − f(x) over a common denominator first. For a square root, multiply top and bottom by the conjugate √(x + h) + √x.
Worked examples
Example 1: a quadratic
f(x) = x² + 2x. Then f(x + h) = (x + h)² + 2(x + h) = x² + 2xh + h² + 2x + 2h. Subtracting f(x) leaves 2xh + h² + 2h = h(2x + h + 2). Dividing by h gives 2x + h + 2, and the limit as h → 0 is 2x + 2.
Example 2: a reciprocal function
f(x) = 1/x. Over a common denominator, 1/(x + h) − 1/x = [x − (x + h)] / [x(x + h)] = −h / [x(x + h)]. Dividing by h gives −1 / [x(x + h)], which tends to −1/x².
Example 3: a square root
f(x) = √x. Multiply by the conjugate: [√(x + h) − √x]/h · [√(x + h) + √x]/[√(x + h) + √x] = h / (h[√(x + h) + √x]). Cancel h to get 1 / (√(x + h) + √x). As h → 0 this becomes 1/(2√x).
Example 4: at a point with numbers
f(x) = x² at x = 3. With h = 1 the quotient is (16 − 9)/1 = 7; with h = 0.1 it is 6.1; with h = 0.01 it is 6.01. The values approach 6 = f′(3), because the simplified quotient is 6 + h.
Difference quotients of common functions
| f(x) | [f(x + h) − f(x)] / h | Limit as h → 0 |
|---|---|---|
| mx + b | m | m |
| x² | 2x + h | 2x |
| x³ | 3x² + 3xh + h² | 3x² |
| ax² + bx + c | 2ax + ah + b | 2ax + b |
| 1/x | −1/[x(x + h)] | −1/x² |
| √x | 1/(√(x + h) + √x) | 1/(2√x) |
Common mistakes
- Writing f(x + h) as f(x) + h. For f(x) = x², f(x + h) = x² + 2xh + h², not x² + h.
- Expanding (x + h)² as x² + h². The middle term 2xh is what survives the subtraction.
- Dropping the brackets around f(x) when subtracting, so only the first term changes sign.
- Setting h = 0 before cancelling, which gives 0/0.
- Forgetting that the answer still contains h. The difference quotient is 2x + h for x²; only the limit is 2x.
Using the calculator for homework
Do the substitution and expansion by hand, then compare each line with Show steps: most errors appear at the expansion or the subtraction. The h-table is a quick sanity check: if your simplified quotient is right, plugging in the same x and h gives the same numbers. For functions such as sin x or eˣ the algebra does not cancel h, so the calculator gives the numbers and the limit from the derivative calculator instead.
Difference quotient practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
f(x + h) − f(x) = 2xh + h² + 5h = h(2x + h + 5); dividing by h gives 2x + h + 5. 2x + 5 is the limit, not the quotient.
f(x + h) − f(x) = 7h, so the quotient is 7: a line has a constant slope.
(2.5² − 2²)/0.5 = (6.25 − 4)/0.5 = 4.5, which also equals 2x + h = 4 + 0.5.
The conjugate turns the numerator into (x + h) − x = h, which cancels the h in the denominator.
The quotient is 3x² + 3xh + h², and setting h = 0 after simplifying gives 3x² = f′(x).
Both the numerator and h become 0. Cancel the factor h first, then let h approach 0.
x² − a² = (x − a)(x + a), so the quotient is x + a; its limit as x → a is 2a.
Quiz complete
Frequently asked questions
What is a difference quotient?
It is [f(x + h) − f(x)]/h, the slope of the secant line between x and x + h. For f(x) = x², it is (2xh + h²)/h = 2x + h.
How do you do the difference quotient?
Substitute x + h into f, subtract f(x), and divide by h. For f(x) = 3x + 1, f(x + h) = 3x + 3h + 1, so the quotient is 3h/h = 3: a line has the same slope everywhere.
How do you find the difference quotient with a calculator?
Enter f, a value of x and a value of h, then make h smaller. For f(x) = x² at x = 3, h = 1, 0.1 and 0.01 give 7, 6.1 and 6.01, approaching 6.
Can you find the difference quotient at a point?
Yes. A specific x gives a number. For f(x) = x³ at x = 1 with h = 0.1, the quotient is (1.331 − 1)/0.1 = 3.31, close to f′(1) = 3. The second tab uses the form [f(x) − f(a)]/(x − a).
How do you simplify the difference quotient?
Expand f(x + h), cancel every term without h, factor h out and cancel it. For f(x) = x² + 2x this gives 2x + h + 2, and the limit as h → 0 is 2x + 2.
Related calculators
- Derivative calculator
- Average rate of change calculator
- Limit calculator
- Tangent line calculator
- Slope calculator
More calculus calculators
Related to This Article
More math articles
- Variables, Correlation, and Causal Reasoning
- Vietnam Escalation, Search and Destroy, and the Credibility Gap
- How to Use Area Models to Divide Two-Digit Numbers By One-digit Numbers
- An In-depth Exploration of How to Find the Codomain
- 4th Grade English Worksheets for New York (NYS ELA): 57 Free Printable PDFs
- Top 10 Free Websites for TASC Math Preparation
- How to Prepare for the CHSPE Math Test?
- How is the GED Math Scored?
- How to Find Asymptotes: Vertical, Horizontal and Oblique
- Louisiana LEAP Grade 3 Math: 49 Free Single-Page Printables, One Skill Each, Answer Keys Included






What people say about "Difference Quotient Calculator: f(x+h) − f(x) / h Steps"?
No one replied yet.