go-supertools
Calculators

Graphing Calculator

Plot functions like sin(x), x^2 or 1/x: drag to move, scroll to zoom, read values, and download a PNG.

Runs in your browser Your input never leaves your device.

      How to write functions

      Write y = x^2 - 3, f(x) = sin(x)/x or just x^3. Give a value a name with a = 2 and use it in any function below it. Use + - * / ^ and brackets; 2x and 2(x+1) mean multiplication, 1/2x means 1/(2x), and x^2! is a factorial of 2. Functions: sin cos tan asin acos atan atan2 sinh cosh tanh exp ln log log2 sqrt cbrt abs sign floor ceil round min max mod pow hypot gamma. Constants: pi, e, tau, phi. Lines starting with # are ignored.

      Drag to move, scroll or pinch to zoom. Click or hover to read values.

      Report a problem with this tool

      About this tool

      Type one function per line, such as y = sin(x), f(x) = x^2/4 or just 1/x, and the graphs appear together in different colours. Drag the graph to move it, scroll or pinch to zoom, and move the pointer over it to read the coordinates and the value of each function at that point; click to copy that x into the Value at x box, or type any x there, including expressions like pi/2. Give a number a name on its own line, for example a = 2, and use it in the functions below it: change the line and every graph follows. Write 2x or 2(x+1) for multiplication; 1/2x means 1/(2x) and 2x^2 means 2·x². The functions are sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, ln, log, log2, sqrt, cbrt, abs, sign, floor, ceil, round, min, max, mod, pow, hypot and gamma, with the constants pi, e, tau and phi, the factorial sign !, and % for the remainder. A switch changes sin, cos and tan between radians and degrees. The graph is broken where a function is not defined (the square root of a negative number) or jumps to infinity (tan x, 1/x), instead of drawing a false line across it. The expressions are read by a small parser written for this page, not by JavaScript's eval, which the security rules of this site do not allow. We checked it against Python's math module on 2,500 random expressions evaluated at seven points each (17,500 values): all agreed to nine digits except cases where C and JavaScript define a result differently (1 to the power NaN), and we tested precedence, errors and limits by hand. A graph is drawn from one sample per pixel or two, so a very fast oscillation or a narrow spike can be missed: zoom in to be sure. Everything is calculated in your browser and nothing is uploaded.

      How to use it

      1. Type your functions, one per line.
      2. Drag to move and scroll or pinch to zoom.
      3. Hover or click to read values, or type x in the Value box.
      4. Download the picture with Download PNG.

      Common problems

      A line says Unknown name
      Only x, your own named values (defined on a line above) and the listed functions and constants can be used. Write multiplication with * or put numbers before names, like 2x.
      The graph shows nothing
      The function may be undefined where you are looking, or the view too far away. Press Reset view, and check the error messages under the box.
      sin(30) is not 0.5
      The calculator uses radians. Switch Angles to Degrees.