Function Calculator
Basic function calculation and graphing; supports analysis and extrema
Supported: +, -, *, /, ^, sin, cos, tan, log, sqrt, abs, pi, e
Enter function expression and set domain to start analysis
Critical Points
Critical points are where the derivative is zero or undefined, including local maxima, minima, and inflection points. These points are crucial for understanding function behavior.
Monotonicity
A function is increasing where the derivative is positive and decreasing where the derivative is negative.
Concavity
A function is concave up where the second derivative is positive and concave down where it is negative.
Numerical Differentiation
This calculator uses numerical differentiation to approximate derivatives; useful for complex functions that can't be differentiated analytically.
Your Privacy is Protected
All calculations run locally in your browser. We do not store or transmit your data.
What is a Mathematical Function?
A function is a rule that takes an input (usually x) and produces exactly one output (usually y or f(x)). It is written as f(x) = …, where the expression on the right tells you what to do with x. For example, f(x) = x² means “square the input” — so f(3) = 9 and f(−2) = 4.
Functions are the language used to describe relationships in science, engineering, and economics. A car’s distance over time, a population’s growth, the trajectory of a ball, and the depreciation of an asset are all modeled with functions. Plotting them makes these relationships visible and easier to reason about.
Every function has a domain (the set of valid inputs) and a range (the set of outputs it produces). Understanding these helps you know where a function is defined and what values it can take.
How to Analyze a Function
To understand a function fully, look at four things:
Domain & range — where is f(x) defined, what values can it output?
Critical points — where is the derivative zero (peaks, valleys)?
Increasing/decreasing — where does the graph rise or fall?
Example — analyze f(x) = x²:
Domain: all real numbers | Range: y ≥ 0 | Critical point: (0, 0) a minimum | Decreasing for x < 0, increasing for x > 0
Key tip: Plotting is the fastest way to build intuition. The calculator above generates the plot, domain, range, and critical points automatically from any expression you enter.
Common Use Cases
Physics and engineering — Motion is described by functions: position, velocity, and acceleration are functions of time. Projectile motion uses quadratic functions; oscillation uses sine and cosine.
Economics — Supply, demand, cost, and profit are all modeled as functions of price or quantity. Finding the maximum of a profit function tells a business the optimal price to charge.
Machine learning — Every model is a function from inputs to predictions, and training means adjusting that function to minimize an error function using calculus.
Education — Function plotting is a core algebra and precalculus skill, the bridge between arithmetic and calculus.
Frequently Asked Questions
What is a mathematical function?
A function is a rule that assigns each input value (usually called x) to exactly one output value (usually called y or f(x)). For example, f(x) = x² takes any number, squares it, and returns the result: f(3) = 9. Functions describe relationships between variables and are the central concept in algebra, calculus, and most of modern mathematics.
How do I find the domain and range of a function?
The domain is the set of all valid inputs (x-values), and the range is the set of all resulting outputs (y-values). For f(x) = √x, the domain is x ≥ 0 (you cannot take the square root of a negative number) and the range is y ≥ 0. For f(x) = 1/x, the domain excludes x = 0 (division by zero). Our calculator reports domain and range automatically.
What are critical points and how do I find them?
Critical points are where a function’s derivative is zero or undefined — typically local maxima (peaks), minima (valleys), or flat points. For f(x) = x², the derivative is 2x, which is zero at x = 0, so (0, 0) is the critical point (a minimum). Critical points are found using calculus, and our calculator identifies them for you.
How do I know where a function is increasing or decreasing?
A function is increasing where its derivative is positive (the graph rises as x increases) and decreasing where the derivative is negative (the graph falls). For f(x) = x², the function decreases for x < 0 and increases for x > 0. The boundary points are usually the critical points found in the previous step.
What types of functions can I plot?
You can plot polynomials (x², x³), rational functions (1/x), trigonometric functions (sin(x), cos(x)), exponential and logarithmic functions (eˣ, ln(x)), and combinations using operators like +, −, ×, ÷, and ^. Our calculator evaluates the expression you enter and plots it over the range you choose.