Digital Graphing Calculator

Does your equation behave the way you think it does?

Enter a function and axis range to instantly plot a graph with key properties including roots, turning points, and domain behavior. Useful for checking equations, visualizing relationships, and confirming calculus results.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Before computers, engineers drew functions by hand, plotting dozens of (x, y) pairs and connecting them with a French curve. This calculator does the same thing — just faster and with fewer coffee stains. It evaluates your function at evenly spaced x values across the range you specify, then connects the resulting points in order.

The number of points matters more than most users expect. A sine wave plotted at 10 points looks like a jagged polygon. At 500 points it looks smooth. The default 500-point resolution balances visual fidelity against rendering speed. For functions that change rapidly — high-frequency oscillations or sharply peaked curves — bump the resolution to 1,000 or 2,000 points.

Root detection works by watching for sign changes between consecutive y values. If the function goes from positive to negative (or vice versa) between two adjacent x samples, a root must exist somewhere in that gap. The calculator narrows the estimate using linear interpolation. This misses roots that touch zero without crossing — like (x-2)^2 at x = 2 — because the sign never changes. That is a known limitation worth keeping in mind when your formula has repeated roots.

When To Use This
Right tool, right situation

Use this tool when you need a quick visual sanity check on any equation — before coding it into a program, before submitting a homework solution, or before presenting a model to a client. It is particularly useful for catching sign errors, wrong coefficients, and domain mistakes that algebraic manipulation can hide.

This tool is appropriate for single-variable functions of x. It works well for polynomials, trigonometric functions, exponentials, logarithms, and any combination of them. It is not appropriate for parametric curves, polar equations, implicit functions (like x^2 + y^2 = 1), or functions of more than one variable.

Do not use the root estimates as final answers for high-precision applications. If you need roots accurate to 8 decimal places, use a dedicated numerical solver like Newton-Raphson after this tool gives you the approximate location. Think of this graph as pointing to the right neighborhood — a proper root-finding algorithm then gives you the exact address.

Common Mistakes
Why results sometimes look wrong

The most common mistake is forgetting that JavaScript operator precedence applies. Writing 1/x+1 gives (1/x) + 1, not 1/(x+1). Add parentheses explicitly: 1/(x+1). This silently produces the wrong graph with no error message, which is harder to catch than a parse failure.

The second mistake is choosing a range that hides interesting behavior. Plotting x**3 - 1000*x from -2 to 2 shows only a near-flat line. Plotting it from -40 to 40 reveals the full cubic shape and its roots. When the graph looks suspiciously boring, expand your range before concluding the function is uninteresting.

The third mistake is trusting the root count as complete. The calculator only reports sign-change roots within your chosen x range. Roots outside the range are invisible. If you expect three roots from the polynomial degree but only see two, extend the range toward negative or positive infinity until all roots appear.

The Math
Worked examples and deeper derivation

Each y value is computed as y = f(x) where x steps from xMin to xMax in increments of (xMax - xMin) / (resolution - 1). The canvas coordinate system maps real-world x and y values to pixel positions using two linear transformations: canvasX = PAD + ((x - xMin) / xRange) * plotWidth, and canvasY = PAD + (1 - (y - yMin) / yRange) * plotHeight. The inversion in the y formula accounts for the canvas coordinate system where y increases downward.

Root finding uses the intermediate value theorem: if f(x1) and f(x2) have opposite signs and f is continuous between them, at least one root exists in the interval. The estimate is refined by linear interpolation: rootX = x1 - f(x1) * (x2 - x1) / (f(x2) - f(x1)). This is equivalent to finding where the secant line between (x1, f(x1)) and (x2, f(x2)) crosses zero.

The minimum y value is simply the smallest finite y in the sample array. This is a sample minimum, not a true calculus minimum — it can miss a narrow local minimum that falls between two sample points. Narrowing the x range or increasing resolution reduces this error significantly.

Checking a physics parabola — projectile height
f(x) = -4.9*x**2 + 20*x + 1.5, x from 0 to 5
The graph peaks around x = 2.04, confirming the projectile reaches maximum height just after 2 seconds. The root near x = 4.15 shows when it hits the ground. This visual check catches sign errors before they break a simulation.
Debugging a sigmoid function in a machine learning pipeline
f(x) = 1 / (1 + Math.exp(-x)), x from -6 to 6
The graph confirms the classic S-curve, saturating near 0 and 1 at the extremes and crossing 0.5 at x = 0 exactly. A developer can verify their implementation before passing it into a neural network layer.
Finding roots of a cubic to factor a polynomial
f(x) = x**3 - 6*x**2 + 11*x - 6, x from 0 to 4
Three roots appear at approximately x = 1, x = 2, and x = 3, matching the factored form (x-1)(x-2)(x-3). A student can visually confirm the roots before doing long division, and catch arithmetic errors instantly.
Expert Unlock
The thing most explanations skip

The linear interpolation root finder assumes the function is approximately linear between adjacent sample points. This assumption fails for functions with very high curvature — like sin(100*x) plotted over a wide range at low resolution. In that case, the sign changes detected are aliasing artifacts, not real roots, and the reported root positions are meaningless. The fix is always the same: reduce the x range to match the feature scale of the function, or increase resolution until the sample density exceeds twice the function's oscillation frequency (Nyquist criterion applied to function sampling).

What syntax does this graphing calculator accept?

How do I write exponents and powers in the function field?
Use ** for any power — for example x**2 for x squared and x**0.5 for square root. You can also write Math.sqrt(x) for square root. The ^ symbol is automatically converted, but ** is the safest form and avoids any ambiguity.
Why does my graph show a near-vertical line instead of a gap?
When a function has a discontinuity — like 1/x near zero — the calculator draws a nearly vertical line connecting the last finite value before the discontinuity to the first finite value after it. This is a known limitation of connected-line plotters and does not mean the function is defined there. Zoom in on the suspicious region to confirm.
How accurate are the root estimates shown below the graph?
Roots are estimated by linear interpolation between adjacent sample points where y changes sign. At 500 points over a range of 10 units, root accuracy is typically within 0.02 units. Increase the plot resolution to 2,000 points or narrow your x range to improve precision.

Need something this doesn't cover?

Suggest a tool — we'll build it →