Graphing Calculator

1.0
-10-8-6-4-2246810-6-4-2246

Drag to pan; pinch, scroll or use the buttons to zoom. With the graph focused, arrow keys pan.

Plot several functions of x, explore them with sliders, and share the graph by link.

Typing a function

Type the right-hand side of y = … in terms of x. Multiplication can be left implied, as on paper: 2x, x(x+1) and 3sin(x) all work, and x^2 is x squared. The functions are the scientific calculator's: sin, cos, tan and their inverses, sinh, cosh, tanh, sqrt, nthroot(x, n), abs, ln, log (base 10), round, floor and ceil, with pi and e as constants. Angles are in radians, which is what makes sin(x) cross zero at π.

A typing mistake shows its message under the line and leaves the other functions drawn. Where a function has no value, such as sqrt(x) left of zero or 1/x at zero, the curve simply stops, and across an asymptote like the ones in tan(x) it is not joined up.

Sliders

Any other single letter becomes a slider, from −10 to 10. Write a x^2 + b and two sliders appear, one for a and one for b, and the curve follows as you drag them. A letter used in two functions is one slider for both, which is how you compare a family of curves. The letter e is always Euler's number, about 2.718, so it never gets a slider.

Moving around the graph

Drag the graph to pan. Pinch on a touch screen, or scroll with a mouse, to zoom about the point under your fingers or the pointer; the buttons zoom about the middle. With the graph focused, the arrow keys pan a tenth of the view at a time, plus and minus zoom, and 0 returns to the starting view. The curves are redrawn for every new view, so zooming in shows real detail rather than a stretched picture.

Sharing a graph

The functions, the slider values and the view are kept in the page's address after the #, so Copy link gives a link that opens this exact graph. The part after the # is never sent to a server, and the graph is drawn entirely in your browser, offline too once the page has loaded. For implicit equations, inequalities, tables and regressions, Desmos is free, needs no account to graph, and does far more.

Why does sin(x) look wrong compared with my calculator?

The graph works in radians, so sin(x) repeats every 2π, about 6.28. A calculator in degree mode repeats every 360. To graph in degrees, write sin(pi x / 180).

How do I graph a family of curves?

Use a letter for the part that changes, for example a x^2, and drag its slider. Put the same letter in a second function to move both together.

Can it graph x = something, or circles?

No. Each line is y as a function of x. Implicit equations such as x^2 + y^2 = 1 need a tool that solves for both, such as Desmos.

Why does the curve stop?

Where a function has no real value, there is nothing to draw: square roots and logarithms of negative numbers, or division by zero. The curve picks up again where the function is defined.