Type a mathematical function and see its graph plotted on an interactive canvas with axes and grid.
A function plotter takes a mathematical expression in one variable, evaluates it at hundreds of points across a range, and draws the resulting curve on a coordinate grid. This tool uses a canvas element with a drawn grid, axis lines and tick marks, and evaluates the expression using JavaScript's Math object — so you write Math.sin(x) for sine, Math.log(x) for the natural logarithm, x**2 for x squared, and Math.PI for π. The hat operator ^ works as a power (it is converted to ** internally).
The expression is evaluated at every horizontal pixel of the canvas — typically over a thousand points on a desktop screen — and discontinuities (like 1/x at x=0 or tan(x) at odd multiples of π/2) are handled by breaking the line when the value jumps to infinity. The y range controls the vertical viewport: set it wide enough to see the peaks and narrow enough that the curve fills the canvas. If the function returns NaN or Infinity at a point, the plotter simply skips it and starts a new line segment.
This is a teaching and exploration tool, not a graphing calculator. It plots one function at a time, does not compute intersections, derivatives or integrals, and does not support parametric or polar equations. For those, a full-featured tool like Desmos or GeoGebra is the right choice. What this page does well is let you type a quick expression and see its shape instantly, in your browser, with no account, no app and no dependency.
The function string is evaluated as JavaScript: new Function("x", "with(Math){return (expr)}"). Supported: sin, cos, tan, asin, acos, atan, log (natural), log2, log10, exp, sqrt, abs, ceil, floor, round, pow, PI, E.
JavaScript Math syntax: Math.sin(x), Math.cos(x), Math.log(x), x**2, Math.sqrt(x), Math.PI. The ^ operator is converted to ** (power).
Not in this version — it draws one function per plot. To compare, change the expression and note the shape.
The function returns Infinity or NaN at those points — for example, 1/x at x=0 or Math.log(x) for x≤0. The plotter skips undefined points.
The input is restricted to alphanumeric characters, operators, parentheses and dots. No arbitrary code execution is possible beyond the Math scope.
No. The function is evaluated locally and the canvas is drawn in your browser. Nothing is transmitted.
Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.
Vai.la is not responsible for how the tools are used or for decisions made based on their results.