Graph Calculator
Type any function and plot several together. See zeros, turning points, asymptotes, period, area and a table of values.
Functions
Window
Drag to move. Scroll, pinch or use + and − to zoom. Point at the graph to read values.
How to type a function
Type each function on its own line. Use x as the variable. The graph updates as you type, and if something cannot be read, a short message under the box tells you what to fix.
The rules
- Use x as the variable. Write the rule in terms of x. A leading “y =” is allowed and ignored.
x^2 + 1 or y = x^2 + 1 - Operators. Add with +, subtract with −, multiply with *, divide with / and raise to a power with ^.
2*x x/3 x^2 2^x - Multiplication sign is optional. You can leave out * between a number and x, a bracket or a function.
2x 3sin(x) (x+1)(x-1) 2pi - Always use brackets after a function. Put the input of sin, cos, ln and the others inside brackets.
sin(x) not sin x - Power of a function. Both ways of writing a squared sine work.
sin(x)^2 or sin^2(x) - Inverse functions. Use asin, acos, atan, acot, asec, acsc, or the long names arcsin, arccos and so on. sin^-1(x) also means the inverse sine.
asin(x) arctan(x) sin^-1(x) - Reciprocal functions. cosec, sec and cot are their own functions. 1/sin(x) is the same as cosec(x), but sin^-1(x) is not.
csc(x) cosec(x) sec(x) cot(x) - Absolute value. Use abs(x) or two bars. For a bar inside a bar, use abs().
abs(x-2) |x-2| - Constants. pi (or the π sign) is 3.14159… and e is 2.71828…
pi*x e^x sin(pi*x) - Roots. sqrt(x) is the square root and cbrt(x) is the cube root. x^(1/3) also works for negative x.
sqrt(4-x^2) cbrt(x) - Logarithms. ln is the natural logarithm. log(x) is base 10. log(x, 2) uses any base you give.
ln(x) log(x) log(x, 2) log2(x) - Radians or degrees. Angles are in radians by default. Switch the Angle unit to Degrees and sin(90) gives 1. Inverse functions then answer in degrees.
sin(30) → 0.5 in Degrees - Use brackets when you divide. Without brackets, 1/2x means (1 ÷ 2) × x. Write the bottom part in brackets to be sure.
1/(2x) not 1/2x - Gaps are normal. Where a function is not defined, such as ln(x) for x ≤ 0 or tan(x) at π/2, the graph simply has a gap. It is not an error.
ln(x) tan(x) 1/x
Functions you can use
| Trigonometric | sin, cos, tan, cot, sec, csc (also cosec) |
|---|---|
| Inverse trigonometric | asin, acos, atan, acot, asec, acsc (also arcsin, arccos, arctan, arccot, arcsec, arccsc, arccosec) |
| Hyperbolic | sinh, cosh, tanh, coth, sech, csch, asinh, acosh, atanh |
| Roots and powers | sqrt, cbrt, exp, and the ^ sign |
| Logarithms | ln, log, log2, log10 |
| Other | abs, floor, ceil, round, sign |
Common mistakes
| Instead of | Type | Why |
|---|---|---|
sin x | sin(x) | A function needs brackets around its input. |
2(x+1 | 2(x+1) | Close every bracket you open. |
x2 | x^2 | x2 means x × 2. Use ^ for a power. |
1/2x | 1/(2x) or x/2 | Without brackets it is read as (1 ÷ 2) × x. |
tan x^2 | tan(x^2) | Put the whole input inside the brackets. |
2 sin x cos x | 2sin(x)cos(x) | Each function needs its own brackets. |
y = ax + b | 2x + 3 | Only x is a letter. Replace a and b with numbers. |
sin(90) looks wrong | Switch Angle unit to Degrees | The default unit is radians, so sin(90) is about 0.894. |
Try an example
Press an example to load it into the graph calculator above.
How to use the Graph Calculator
- Type a function. Click a line under Functions and type a rule in x, such as sin(x) or x^2 − 4. The graph is drawn as you type. Press Typing rules if you are not sure how to write something.
- Add more functions. Press Add function to plot up to eight graphs together. Each has its own colour. Use the coloured dot to hide or show a graph.
- Move and zoom. Drag the graph to move it. Scroll, pinch or use the + and − buttons to zoom. Move the pointer over the graph to read exact values.
- Read the details. Under the graph, pick a function to see its domain, range, period, symmetry, zeros, turning points and asymptotes, then try the value finder, the area tool, the intersections and the table of values.
About this tool
The Graph Calculator draws the functions you type and explains them. It plots many functions in one picture, so you can compare sin x with cos x, a parabola with a line, or eˣ with ln x. You can drag, zoom, hide a graph, download the picture and copy a link that opens the same graphs again.
Below the graph, a details panel works out what you would otherwise do by hand: the domain, the range in the visible window, the period, whether the function is even or odd, the points where it crosses the axes, its highest and lowest points, and its vertical and horizontal asymptotes. You can also find f(x) and the slope at any x, measure the area under a curve between two values, see where two graphs meet and print a table of values.
The tool reads your text safely with its own parser, so only maths is understood. It supports trigonometric, inverse trigonometric and hyperbolic functions, roots, powers, logarithms and absolute value, in radians or degrees. Everything is calculated in your browser.
Frequently asked questions
How do I plot a graph online?
Type a function of x, such as x^2 + 1, into the first line under Functions. The graph appears at once. Drag it to move and scroll or pinch to zoom.
How do I plot more than one function at the same time?
Press Add function and type another rule. You can plot up to eight functions together, each in its own colour. Use the dot beside a function to hide or show it.
How do I type sin, cos, tan, powers and roots?
Write sin(x), cos(x), tan(x), x^2 and sqrt(x), always with brackets around the input. The Typing rules section on this page lists every rule with examples and common mistakes.
How do I graph in degrees instead of radians?
Change Angle unit to Degrees. Then sin(90) is 1. The default is radians, where one full turn is 2π.
How do I find where two graphs meet?
Plot both functions. The details panel has a section called Where the graphs meet that lists the x and y values of every crossing in the visible window.
How do I find the zeros, maximum and minimum of a function?
Choose the function in the details panel. It lists the x-intercepts (zeros) and the local maximum and minimum points inside the visible window. Zoom out to search a wider range.
Why does my graph have a gap or a broken line?
The function is not defined at that point. For example, tan(x) has gaps at π/2 and ln(x) has no graph for x ≤ 0. The calculator leaves a gap instead of joining the two sides.
Can I save or share my graph?
Yes. Press the download button to save the picture as a PNG, or the link button to copy a web address that opens the same functions again.
How accurate are the results?
The values are found by careful numerical methods, so they are very close but are estimates, shown to about six digits. For an exact answer, use the formula in your course and use the tool to check it.
Can I use this on my phone?
Yes. It works in any modern phone or desktop browser. On a phone you can drag the graph with one finger and pinch to zoom.