Skip to content

Graphing Calculator

Graph up to four functions online and find their roots, intercepts, intersections, maxima and minima numerically, with a table of values and a shareable link.

Calculator Details

Roots of f₁:…See results ↓

Use x, + − * / ^ and brackets; sin, cos, tan (radians), asin…, sinh…, sqrt, cbrt, exp, ln (natural log), log (base 10), abs, floor, pi, e. 2x means 2·x

Left edge of the window

Right edge of the window

Fit the curves automatically (spikes at asymptotes are cut off) or set the range

Value of every function at this x

Your Results

Roots of f₁: …

Roots of f₁

…

Loading the graphing engine…

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

How This Calculator Works

How it's calculated

Each function is read with the scientific calculator's rules (log is base 10, ln is natural, trig in radians) and evaluated at 401 evenly spaced points across the window to draw the curve. Where the curve jumps from very large to very large of the other sign (an asymptote, such as tan x at π/2), the line is broken rather than joined.

Roots are found where f(x) changes sign between two of 2,001 grid points, then narrowed down with Brent's method to full double precision. A sign change across a pole (1/x at 0) is not a root because f is not close to 0 there. A root where the curve only touches the axis, like x² at 0, is found as a minimum or maximum whose value is 0. Maxima and minima are grid points higher (or lower) than both neighbours, refined with Brent's minimisation. Intersections are the roots of f₁(x) − f₂(x) for each pair.

Numeric answers are shown to 10 significant figures. They are not exact symbolic roots: √2 appears as 1.414213562. Only what is inside the window is found, so widen or move it to look further.

Frequently Asked Questions

How do I type a function?

Type the right-hand side of y = f(x) using x: x^2 - 2, 3x + 1, sin(x)^2, e^(-x^2), sqrt(x + 4), abs(x - 1), ln(x). Multiplication can be implied (2x, 3sin(x)). Use ^ for powers and brackets for function arguments. log(x) is the base-10 logarithm and ln(x) the natural one, as on a scientific calculator; log(x, 2) is base 2. Trig functions use radians.

How does the calculator find the roots of a function?

It scans the window at 2,001 points for places where f(x) changes sign and narrows each one down with Brent's method, which combines bisection with faster interpolation steps. For x² − 2 on [−5, 5] it finds x = −1.414213562 and x = 1.414213562, which are −√2 and √2 to 10 significant figures. The answers are numeric, not exact square roots.

How do I find where two graphs intersect?

Enter both functions. The calculator finds the roots of the difference f₁(x) − f₂(x), which are the x values where the curves meet, and gives each point with its y value. sin x and cos x meet first at (0.7853981634, 0.7071067812), which is (π/4, √2/2).

How are maxima and minima found?

A local maximum is a point higher than everything close to it on both sides, a local minimum lower. The calculator finds grid points that are higher or lower than both neighbours and refines them with Brent's minimisation. For x³ − 3x it finds a local maximum at (−1, 2) and a local minimum at (1, −2), where the derivative 3x² − 3 is zero. End points of the window are not counted.

Why is there a gap in my graph?

The function is undefined there or jumps to infinity. ln(x) and sqrt(x) are not real for negative x, 1/x is undefined at 0, and tan x has vertical asymptotes at ±π/2. The graph is broken at an asymptote instead of drawing a false vertical line, and a sign change across a pole is not counted as a root: tan x on [−2, 2] has 1 root, at x = 0.

How do I zoom in on part of the graph?

Use Zoom in and Zoom out, which halve or double the window about its centre, and the arrows to move it left or right, or type the x range yourself. Set the y axis to a fixed range when the automatic fit is dominated by large values. The window is part of the link, so a shared graph opens with the same view.

Can it solve an equation like x³ = 2x + 1?

Yes, graphically: enter x^3 as f₁ and 2x + 1 as f₂ and read off the intersections, or enter x^3 - 2x - 1 as one function and read its roots. For exact roots of linear, quadratic and cubic equations, with the working, use the equation solver.

Does it work like a TI-84 or Desmos?

It covers the common graphing tasks: plotting y = f(x), the table of values, zeros (roots), maxima, minima, intersections and the value at a point, as the CALC menu of a hand-held graphing calculator does. It does not draw implicit curves, polar or parametric graphs, inequalities or sliders.

Roots, intersections and extrema are found numerically (a 2,001-point scan refined by Brent's methods) in double precision and shown to 10 significant figures; they are approximations, not exact symbolic answers. Trig is in radians; log means base 10 and ln the natural log. Only the window is searched: a root the curve touches between grid points, or an oscillation faster than the grid, can be missed, and at most 25 roots or extrema per function are listed. Not included: implicit curves (x² + y² = 1), polar and parametric graphs, inequalities, sliders, 3-D surfaces and complex values (points where f is not real are left out). For the derivative and tangent line see the derivative calculator; for exact roots of polynomials see the equation solver.

Graphing Calculator: Plot Functions and Find Roots, Intersections, Maxima and Minima

By FindMySum · Last reviewed

A graphing calculator draws the curve y = f(x) for a formula you type and lets you read its important points off the graph: where it crosses the x-axis, where it peaks and dips, and where two curves meet. This one plots up to four functions at once, finds those points numerically, gives a table of values and the value of every function at an x of your choice, and keeps the whole graph, window included, in a link you can share.

What a graph of a function shows

A function assigns one output y to each input x. Its graph is the set of points (x, f(x)), so reading the graph is reading the function. The features a maths course asks about are:

  • Roots, zeros or x-intercepts: the x values where f(x) = 0, where the curve meets the horizontal axis.
  • The y-intercept: f(0), where the curve meets the vertical axis.
  • Local maxima and minima (turning points): points higher or lower than everything close to them.
  • Intersections: points where two curves have the same y for the same x, which solve the equation f₁(x) = f₂(x).
  • Asymptotes and gaps: places where the function is undefined or runs off to infinity.

How the calculator finds each point

The formula is read with the same rules as a scientific calculator: ^ for powers, implied multiplication (2x means 2 × x), log for the base-10 logarithm and ln for the natural one, and trig functions in radians. It is then evaluated as a plain floating-point function; nothing is run as code.

Drawing. The curve is evaluated at 401 points across the window. Points where the function is not a real number (the square root of a negative, the log of zero) are left out, and a jump from a very large value to a very large value of the other sign between neighbouring points is treated as an asymptote, so the line is broken instead of joined.

Roots. The window is scanned at 2,001 points. Wherever f(x) changes sign between neighbours, the interval must contain a root (for a continuous function, by the intermediate value theorem), and Brent's method narrows it down. Brent's method, published by Richard Brent in 1973, combines safe bisection with faster secant and inverse-quadratic steps and reaches full double precision in a handful of steps. A sign change can also happen across a pole, as with 1/x at 0; there f is not close to zero, so the point is rejected. A root where the curve touches the axis without crossing, like x² at 0, has no sign change; it is found as a minimum or maximum whose value is zero.

Maxima and minima. A grid point higher than both neighbours brackets a local maximum (lower for a minimum). Brent's minimisation, a golden-section search with parabolic steps, refines it, and a final root search on the slope adds digits. End points of the window are not counted, because the curve may keep rising beyond them.

Intersections. For each pair of functions the calculator finds the roots of the difference f₁(x) − f₂(x) and reports each crossing with its y value.

Worked example

The calculator opens with f₁(x) = x³ − 3x and f₂(x) = 2 sin x on the window from x = −3 to 3.

  1. Roots of f₁. Factor: x³ − 3x = x(x² − 3), so the roots are 0 and ±√3. The calculator lists −1.732050808, 0 and 1.732050808.
  2. Turning points. The derivative 3x² − 3 is zero at x = ±1. f₁(−1) = −1 + 3 = 2 and f₁(1) = 1 − 3 = −2, so there is a local maximum at (−1, 2) and a local minimum at (1, −2), which the calculator finds numerically.
  3. Value at a point. At x = 1, f₁(1) = −2 and f₂(1) = 2 sin 1 ≈ 1.682941970.
  4. Intersections. x³ − 3x = 2 sin x has no algebraic solution apart from x = 0, which is the point where numeric methods earn their keep. The calculator finds three crossings in the window: x = 0 and x ≈ ±1.981305042, where both curves are at y ≈ ±1.833835851.

The table of values below the graph gives each function at 11 evenly spaced x values across the window, a quick check on the shape of the curve and handy for sketching it by hand.

Choosing a good window

Most surprises on a graphing calculator come from the window. A few habits help:

  • Start wide, then zoom in. A window of −10 to 10 shows the overall shape; zoom in on each feature to read it accurately. The zoom buttons halve or double the window about its centre.
  • Fix the y axis when one value dominates. The automatic fit uses the whole range of values, but trims isolated spikes near asymptotes. If a steep curve squeezes the others flat, set the y range yourself.
  • Mind the units of angles. Trig here is in radians, so sin x repeats every 2π ≈ 6.28. A window of −3 to 3 shows about one period.
  • Look outside the window for the full story. Roots and extrema are only searched for inside the window. A cubic always has at least one real root, but it might sit off to the side.

Limits of a numeric graph

Numeric root finding gives answers to about 10 significant figures, not exact forms: √2 appears as 1.414213562. That is enough for homework checks, engineering and science, but if you need the exact form, solve algebraically (the equation solver shows the working for linear, quadratic and cubic equations). A curve that touches the axis between two grid points without crossing, or oscillates faster than the grid (sin(1/x) near 0), can hide a root; zooming in reveals it. Functions are evaluated only where they are real numbers, so complex roots of polynomials do not appear.

Using a graph to solve equations

Any equation in one unknown can be solved on a graph. To solve x³ = 2x + 1, either enter both sides as separate functions and read the intersections, or move everything to one side and read the roots of x³ − 2x − 1. The two approaches give the same x values (−1, and (1 ± √5)/2 ≈ 1.618 and −0.618). The graph also shows how many solutions there are, which algebra alone does not always make obvious, and whether a solution is a clean crossing or a near-miss where the curves only just touch.

More questions

What is the difference between a root, a zero and an x-intercept?

They describe the same x values from different angles. A root or zero of f is a solution of f(x) = 0; an x-intercept is the point (x, 0) where the graph meets the horizontal axis. A polynomial of degree n has at most n real roots, so a cubic crosses the x-axis at most three times.

How do I know if I have found every root?

Only the window is searched, so a root outside it is not listed. Zoom out to see the overall shape first: polynomials eventually head to plus or minus infinity, and periodic functions such as sin x repeat. Then zoom in on each crossing. For polynomials, the degree tells you the maximum number of real roots to look for.

Why does my answer read 0.9999999999 instead of 1?

The calculator works in double-precision floating point, about 16 significant digits, and numeric methods stop when the answer is as close as that precision allows. It shows 10 significant figures and rounds values within a billionth of the window width of zero to 0, so most such cases read exactly, but a turning point found by minimisation can still show a small last-digit error.

Can I graph a vertical line like x = 2 or a circle?

Not directly: this calculator graphs functions y = f(x), which give one y for each x. A vertical line is not a function of x, and a circle x² + y² = r² needs two functions: enter sqrt(4 - x^2) and -sqrt(4 - x^2) to draw a circle of radius 2.

What window should I use for trigonometric functions?

Trig functions here take radians, so one full period of sin x or cos x is 2π, about 6.28. A window from −7 to 7 shows two periods each side of the y-axis. For tan x, fix the y axis to something like −10 to 10 so the curve between the asymptotes is readable.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy