Minima and Maxima Calculator

Local Maxima and Minima Calculator

Enter a polynomial function of x and instantly find its local maxima and minima, with the derivative and critical points shown.

Polynomials only, one variable (x), use ^ for exponents.
Derivative: f'(x) =
Critical points:
Local Maxima
Local Minima
Blue line: f(x). Red dots: local maxima. Green dots: local minima.

How to use this calculator

Type a polynomial function of x, using ^ for exponents — for example 4x^3 + 3x^2. Press Calculate to see the derivative, every critical point, and which ones are local maxima or minima. Use Reset to start over.

What are local maxima and minima?

A local maximum is a point on a function's graph whose y-value is higher than every nearby point around it — a peak. A local minimum is a point whose y-value is lower than every nearby point — a valley. Neither has to be the highest or lowest point on the whole graph, just the highest or lowest in its immediate neighborhood.

How to find local maxima and minima

1. Find f'(x), the derivative of the function.
2. Solve f'(x) = 0 to get the critical points.
3. Find f''(x), the second derivative, and evaluate it at each critical point.
4. A positive second derivative means a local minimum; a negative second derivative means a local maximum.
5. If the second derivative is zero, check whether f'(x) changes sign at that point. A change from negative to positive is a minimum, and a change from positive to negative is a maximum. No sign change means neither (for example, x = 0 in x³).

Worked example

Function: f(x) = 4x³ + 3x²
f'(x) = 12x² + 6x, which factors to 6x(2x + 1), giving critical points at x = 0 and x = −1/2.
Evaluating f at each point gives a local minimum at (0, 0) and a local maximum at (−0.5, 0.25).

Frequently asked questions

What's the difference between local and absolute maxima?

An absolute (global) maximum is the single highest value of the function across its entire domain. A local maximum is only the highest value in its immediate neighborhood — a function can have several local maxima but only one absolute maximum.

Can a function have no local maxima or minima?

Yes. A linear function like f(x) = 2x + 1 has a constant slope that's never zero, so it never turns and has no local extrema.

Why use the second derivative instead of just checking nearby points?

The second derivative tells you the concavity at that exact point — positive means the curve bends upward (a valley), negative means it bends downward (a peak) — which is faster and more reliable than sampling points on either side.

Does this calculator work for trig or exponential functions?

No, this tool is built for polynomials only. Functions with trig, exponential, or logarithmic terms need different differentiation rules that aren't covered here.