Intermediate

Maximum and Minimum Calculator

Find the absolute maximum and minimum values of a chosen function over a closed interval [a, b].

Function f(x)

Choose a function to optimize
Start of interval
End of interval
Absolute maximum
1.1250

reached at x = 2.8903

Minimum value
-2
Minimum at x
4.7124
Maximum value
1.125
Maximum at x
2.8903
Interval
[0, 6.2832]
MaxMin
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

This tool finds a function’s absolute maximum and minimum on a closed interval [a, b]. It samples 2000 evenly spaced points, evaluates the function at each, and reports the largest and smallest values together with the x-coordinates where they occur, plotting the curve with both extrema marked.

Formula
Sample xi = a + i·(b−a)/N for i = 0..N; max = largest f(xi), min = smallest f(xi)
How this is calculated

Pick a function f(x) from the list and set the interval endpoints a and b. The order of a and b does not matter — the calculator uses the smaller as the lower bound and the larger as the upper bound, so the interval is always [min(a,b), max(a,b)].

The method divides the interval into N = 2000 equal subintervals, giving sample points xi = a + i·(b−a)/N for i = 0 to N. The function is evaluated at every sample point and the largest and smallest values are tracked along with the x at which they occur. By the Extreme Value Theorem a continuous function on a closed bounded interval attains both an absolute maximum and an absolute minimum, so dense sampling reliably approximates them.

Because this is a numerical sample rather than exact calculus, the reported extremum locations carry a small error on the order of one subinterval width, (b−a)/2000. For sharply peaked functions you can narrow the interval for higher resolution. Non-finite evaluations (such as overflow) are skipped, and if no finite values exist the result is undefined.

Frequently asked questions

No. The calculator automatically treats the smaller value as the lower bound and the larger as the upper bound, so [a,b] and [b,a] give the same result.

With 2000 samples the extremum x-location is accurate to roughly (b−a)/2000. Tightening the interval around a suspected extremum improves precision further.

It reports the absolute (global) maximum and minimum over the interval. A local extremum is only reported if it also happens to be the global one on that interval.

Also known as

maximum minimum calculator
extrema calculator
absolute max min
optimization calculator
max min calculator
local extrema

APA

TG we-Calculate Editorial Team. (2026). Maximum and Minimum Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/maximum-minimum-calculator

Chicago

TG we-Calculate Editorial Team. "Maximum and Minimum Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/maximum-minimum-calculator.

IEEE

TG we-Calculate Editorial Team, "Maximum and Minimum Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/maximum-minimum-calculator

BibTeX

@misc{wecalculate_maximum_minimum_calculator, title = {Maximum and Minimum Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/maximum-minimum-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?