ZumaTools

Function Grapher

Type an expression like sin(x) or x^2 - 3x and the graph redraws instantly as you edit.

y =

Supported: + − × ÷, ^ for powers, parentheses, sin, cos, tan, sqrt, abs, ln, log, exp, and the constants pi and e. Implicit multiplication like 2x or 2(x+1) works.

Everything is parsed and plotted locally in your browser — nothing you type is sent anywhere.

How it works

  1. Type a function of x, such as x^2 - 2x + 1 or sin(x)/x, into the first input field.
  2. Add up to two more functions with the Add function button to compare curves in different colors.
  3. Adjust the x-range fields or use the zoom buttons to frame the part of the graph you care about.

Frequently asked questions

What syntax does the function grapher accept?
Standard math notation: + - * / for arithmetic, ^ for powers, and parentheses for grouping. The functions sin, cos, tan, sqrt, abs, ln, log, and exp are available, along with the constants pi and e. Implicit multiplication works too, so 2x, 3sin(x), and (x+1)(x-2) are all understood without writing * explicitly.
What is the difference between ln and log?
ln(x) is the natural logarithm with base e, the one used in calculus and growth models. log(x) is the base-10 logarithm common in engineering and chemistry. If you need another base, use the change-of-base formula, for example ln(x)/ln(2) for a base-2 logarithm.
How does the grapher handle asymptotes and undefined regions?
Points where a function is undefined or infinite, such as tan(x) at pi/2 or 1/x at zero, are detected during sampling and the curve is broken there instead of drawing a false vertical line. Domains that produce no real value, like sqrt(x) for negative x, are simply left blank.
Is anything I type sent to a server?
No. The expressions are parsed and evaluated entirely in your browser with a small purpose-built math parser — there is no eval, no network request, and nothing is stored. You can load the page once and keep graphing offline.
How is the vertical scale chosen?
The grapher samples each function across the visible x-range, discards extreme outliers near asymptotes, and fits the y-axis to the remaining values with a small margin. This keeps curves like tan(x) readable instead of letting one spike flatten everything else. Narrow the x-range if you want to inspect a spike in detail.

About this tool

This function grapher plots equations of the form y = f(x) on a clean coordinate grid, with up to three functions shown at once in distinct colors. It covers the everyday needs of algebra, precalculus, and calculus homework: checking the shape of a parabola, finding where two curves intersect visually, seeing how a coefficient changes a graph, or confirming the behavior of trigonometric and exponential functions before an exam.

Expressions are handled by a small parser written specifically for this tool. It tokenizes your input, applies the usual precedence rules (parentheses, then powers, then multiplication and division, then addition and subtraction), and evaluates the result at a few hundred sample points across the visible range. Because the parser understands implicit multiplication, natural notation such as 2x, 3(x-1), or x sin(x) works exactly as you would write it on paper. Everything runs client-side in your browser; nothing you type is transmitted anywhere.

The plot adapts as you work. The y-axis scales itself to the sampled values while trimming outliers, so a function with vertical asymptotes like tan(x) or 1/(x-2) stays readable, and breaks in the domain are rendered as gaps rather than misleading vertical strokes. Gridlines snap to round intervals such as 0.5, 1, 2, or 5, and the axis labels update with the zoom level, so you can read coordinates directly off the chart.

A few practical tips: use ^ for powers (x^3, e^(-x^2)), use pi in ranges and arguments (sin(2pi x)), and remember that log is base 10 while ln is base e. To compare a function with its derivative or a transformed copy, add a second row and edit it independently — each row reports its own syntax errors, so a typo in one function never blanks the others.

Related tools