Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Difference quotient calculator

Enter f(x). You get f(x + h), the difference quotient simplified algebraically, its limit as h → 0, and a table showing the values closing in on the derivative.

Use x, numbers, + − * / ^ and brackets, with sin, cos, tan, sec, csc, cot, arcsin, arccos, arctan, e^x, ln, log (base 10), log_2(x), sqrt and abs. You can write 2x, sin x and pi.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Skip the limit with the derivative calculator, or use the slope to estimate values with the linear approximation calculator.

What the difference quotient is

The difference quotient is the slope of the secant line between x and x + h: the average rate of change of f over a step of size h. As h shrinks to 0, the secant turns into the tangent and the average rate becomes the instantaneous rate of change, the derivative f′(x).

Difference quotient = [f(x + h) − f(x)] / h
f′(x) = limit as h → 0 of [f(x + h) − f(x)] / h

How it's simplified

For a polynomial or a ratio of polynomials, the calculator writes f(x + h) − f(x) over a common denominator, multiplies everything out, and cancels the factor h that every term of the top shares. What's left is valid for every h ≠ 0. Setting h = 0 in it gives f′(x). For other functions, like sin x or √x, there's no general algebraic simplification, so you get the numeric table instead.

Worked example

Take f(x) = x² + 3x.

  1. f(x + h) = (x + h)² + 3(x + h) = x² + 2xh + h² + 3x + 3h.
  2. f(x + h) − f(x) = 2xh + h² + 3h.
  3. Divide by h: the difference quotient is 2x + h + 3.
  4. Let h → 0: f′(x) = 2x + 3.

At x = 2 the quotient is 7.1 for h = 0.1 and 7.01 for h = 0.01, closing in on f′(2) = 7.

A rational example: for f(x) = 1/x, f(x + h) − f(x) = (x − (x + h))/(x(x + h)) = −h/(x(x + h)), so the quotient is −1/(x(x + h)) and f′(x) = −1/x².

Limitations

  • Algebraic simplification covers polynomials and rational functions. Roots, trig, exponentials and logs get the numeric table only.
  • In the table, very small h eventually loses accuracy to rounding: subtracting two nearly equal numbers wipes out digits. That's why the table stops at h = 0.000001.
  • The simplified quotient is valid only for h ≠ 0, and only where f(x) and f(x + h) are both defined.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • x² + 3x → 2x + h + 3 ✓
  • 1/x → −1/(x(x + h)) ✓
  • x³ at x = 2 with h = 0.1: 12.61 ✓
  • sin x: no algebraic simplification, numeric table only ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the difference quotient?

[f(x + h) − f(x)]/h, the slope of the line through (x, f(x)) and (x + h, f(x + h)). It's the average rate of change of f over that step.

How do you simplify a difference quotient?

Write out f(x + h), subtract f(x), combine everything over one denominator, cancel the common factor h from the top, and stop. Don't set h = 0 until you want the derivative.

What is the instantaneous rate of change?

The derivative f′(a): the limit of the average rate of change as the step h shrinks to 0. Geometrically, it's the slope of the tangent line at x = a.

Why can't I just put h = 0 at the start?

Then you'd get 0/0, which is undefined. Cancelling h first is what makes the limit easy to see.

Related calculators