AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I graph a function online for free?

Type an expression like x^2, sin(x) or 2x+1 into AnyTool Graphing Calculator and it plots y = f(x) instantly on a Cartesian grid. Add up to four functions in distinct colours with show/hide toggles, then drag to pan, scroll to zoom toward the cursor, or type an exact x/y window. Hover anywhere to trace live coordinates on every curve, and open the table of values to read evenly-spaced (x, y) pairs you can copy into a spreadsheet. Switch trig between radians and degrees. Every function is parsed by a real expression engine — never eval() — and everything runs in your browser, so nothing is uploaded.

  • Plot up to 4 functions at once, each in its own colour
  • Drag to pan, scroll/buttons to zoom, type an exact window, one-click reset
  • Hover trace with a crosshair and live coordinate readout
  • Table of values across the visible x-range, copyable as TSV
  • Radian or degree trig; 100% in your browser — no eval, no upload

What is

Graphing calculator

A graphing calculator is a tool that draws the curve of a function y = f(x) by evaluating it across a range of x-values and plotting the resulting points on a coordinate grid, with controls to pan, zoom, trace coordinates and tabulate values. AnyTool implements one in the browser: each expression is compiled once by a tokenizer plus the shunting-yard algorithm into Reverse Polish Notation, then sampled once per pixel and rendered to an HTML canvas — without eval().

Calculators

Related terms

Cartesian coordinate systemAsymptoteFunction samplingOrder of operations

Frequently Asked Questions

It evaluates the function at one x-value per horizontal pixel across the visible range and connects the points, lifting the pen where the function is undefined or jumps sharply.

AnyTool Graphing Calculator compiles your expression once with a tokenizer and the shunting-yard algorithm, then walks across the canvas evaluating y for each pixel column of x and drawing line segments between successive points. When a point is undefined or the value jumps by a huge amount between neighbouring samples — as happens at an asymptote like 1/x or tan(x) — it lifts the pen so no false vertical line is drawn. Because it samples at finite resolution, very steep or rapidly oscillating curves can alias, which is why zooming in reveals the true shape.

Yes — plot up to four functions together, each in its own colour, with show/hide toggles and a value table for whichever one you choose.

You can enter up to four expressions and they are drawn simultaneously in distinct colours, each with a toggle to show or hide it without deleting it. Hovering traces live coordinates on every visible curve, and the table of values lets you pick one function and read evenly-spaced (x, y) pairs across the current x-window, which you can copy as tab-separated text into a spreadsheet.

Gaps appear at undefined points and asymptotes, which the tool deliberately does not connect; jaggedness comes from finite per-pixel sampling on very steep or oscillating curves.

The grapher evaluates the function at one point per pixel, so a curve that changes extremely fast — like sin of a large multiple of x, or a near-vertical section — can look jagged or aliased until you zoom in. Gaps are intentional: where a function is undefined (the square root of a negative number, division by zero) or shoots toward infinity at an asymptote, the pen is lifted instead of drawing a misleading vertical streak. This keeps the picture honest rather than smoothing over real discontinuities.

Yes — all parsing and plotting happen in your browser with no server call, and the page keeps working offline after first load.

AnyTool Graphing Calculator compiles, samples and renders every function locally in JavaScript on an HTML canvas, so nothing you type is ever sent to a server, there is no account or tracking, and the tool keeps working without a connection once loaded. It plots explicit y = f(x) functions only — it is not a computer-algebra system and does not handle symbolic algebra, implicit, parametric or polar curves, or inequalities.

Detailed Explanation

Methodology

How the Graphing Calculator Plots a Function

AnyTool Graphing Calculator draws each curve entirely in the browser. Every expression is compiled once by the reusable math engine — a tokenizer splits it into numbers, operators, parentheses, function names and the variable x; the shunting-yard algorithm reorders the tokens into Reverse Polish Notation that honours operator precedence and right-associative exponentiation. To render, the tool sweeps across the HTML canvas one pixel of x at a time, evaluates the compiled expression with x bound to that column, and connects successive points with line segments. There is no eval() and no new Function() — the input is parsed as data, never executed — and because the same compiled expression re-evaluates with any variable map, the engine is shared with the scientific calculator.

  • Tokenizer → shunting-yard → Reverse Polish Notation, compiled once per expression
  • Sampled once per horizontal pixel, then connected with line segments
  • Rendered to an HTML canvas for smooth pan and zoom
  • No eval() or new Function() — expressions are parsed, never executed
  • Plots explicit y = f(x) only; the variable is x
How It Works

Multiple Functions, Pan, Zoom, Trace and Tables

Up to four functions can be plotted at once, each in a distinct colour with a show/hide toggle that hides a curve without deleting it. The view is fully interactive: drag to pan, scroll to zoom toward the cursor, use zoom-in/zoom-out buttons, or type an exact x-min, x-max, y-min and y-max window, with one-click reset. Hovering the graph traces the x-value under the cursor, evaluates every visible function there, and shows a crosshair with coloured dots plus a live coordinate readout. A table of values tabulates a chosen function at evenly-spaced points across the visible x-range — flagging undefined points honestly — and can be copied as tab-separated text into a spreadsheet. Trigonometric functions can be interpreted in radians or degrees.

  • Up to 4 functions in distinct colours with show/hide toggles
  • Drag-to-pan, scroll/button zoom, exact numeric window and reset
  • Hover trace with crosshair, coloured dots and coordinate readout
  • Copyable table of values across the visible x-range
  • Radian or degree angle mode for trigonometric functions
Limitations

Finite Sampling and What It Is Not

Because the grapher evaluates one point per pixel, it produces a faithful picture at normal zoom but a finite-resolution one: extremely steep, near-vertical or rapidly oscillating curves can alias or appear jagged, and zooming in reveals their true shape. The renderer deliberately lifts the pen across undefined points and very large value jumps so that asymptotes — such as 1/x or tan(x) — are not joined by false vertical lines. The tool plots explicit y = f(x) functions only: it is not a computer-algebra system and does not perform symbolic algebra, nor does it support implicit relations, parametric or polar curves, or inequalities. AnyTool states these limits plainly so the visualisation is never mistaken for exact symbolic work.

  • Samples once per pixel — steep or oscillating curves can alias
  • Pen is lifted at undefined points and asymptotes (no false verticals)
  • Explicit y = f(x) only — no implicit, parametric or polar curves
  • No symbolic algebra, inequalities or computer-algebra features
  • Zoom in to resolve the true shape of fast-changing curves
Privacy & Security

Privacy and Offline Use

All compiling, sampling and canvas rendering run in the browser, so nothing you type is sent to a server, there is no account or tracking, and the page keeps working offline after first load. The functions, view window and table live only in the page and reset on reload. The shared expression engine is unit-testable, so its parsing and evaluation behave consistently and verifiably.

Function graphing: in-browser (AnyTool) vs typical online graphers
CapabilityAnyToolTypical online graphers
EvaluationTokenizer + shunting-yard (no eval)Often eval() or server-side
Functions at onceUp to 4, distinct colours, togglesVaries; often one at a time
Pan & zoomDrag, scroll-to-cursor, exact windowSometimes buttons only
TraceHover crosshair + live coordinatesOften absent
Table of valuesYes, copyable as TSVFrequently missing
Asymptote handlingPen lifted — no false verticalsOften draws spurious lines
Works offlineYes (PWA)No
Cost / signupFree, no signupOften ad-heavy or gated

AnyTool compiles, samples and renders every function locally with a real parser and uploads nothing.