UTILS.
100% in-browser
📈

Function Graphing Calculator

Plot y = f(x) for one or more functions on a pan-and-zoom canvas, with automatic axes, gridlines, x-intercept roots and the y-intercept.

Enter one function per line. Drag to pan, scroll to zoom.

About this tool

The Function Graphing Calculator is a free, in-browser plotting tool that draws y = f(x) for one or more functions on an interactive canvas. Type each function on its own line and it samples the curve at pixel resolution across the visible window, mapping data coordinates to the canvas and drawing a smooth polyline. It detects large jumps and vertical asymptotes and breaks the path there instead of drawing a false vertical line, so functions like tan(x) and 1/x render correctly.

All rendering and math run locally in your browser with the Canvas 2D API and no external libraries, so nothing you plot is uploaded. Drag the canvas to pan and use the mouse wheel to zoom in or out about the cursor; the axes, gridlines and curves redraw live. Set the initial x-range with the min and max fields and press Plot — the vertical range is chosen automatically from the sampled values, and further zooming is free in both directions.

For the first function the tool also locates x-intercepts (roots) by scanning consecutive samples for sign changes and refining each bracket with the bisection method, and it reports the y-intercept f(0). Enter expressions with the usual operators, ^ for powers, parentheses, the constants pi and e, and functions such as sin, cos, exp, ln and sqrt. It captures the simple, offline slice of what tools like Desmos do.

Frequently asked questions

Can I plot several functions at once?
Yes. Put each function on its own line in the expression box and every valid one is drawn in a different colour on the same axes. If a line cannot be parsed it is skipped and the rest are still plotted, with a small notice shown.
How do I pan and zoom?
Drag anywhere on the canvas to pan the view, and scroll the mouse wheel to zoom in or out centred on the cursor. The x-min and x-max fields set the starting window; press Plot to reset the view and auto-fit the vertical range.
How are roots found?
For the first function the tool scans adjacent sample points for a sign change in y, then refines each sign-change bracket with the bisection method to converge on the x-intercept. Up to six roots in the visible window are listed, along with the y-intercept f(0).
Why does the graph break near asymptotes?
When consecutive samples jump by more than a couple of screen heights — as happens at a vertical asymptote of tan(x) or 1/x — the tool lifts the pen instead of connecting them, avoiding a spurious near-vertical line and showing the true shape.

More tools