How to use the function grapher
Type the right-hand side of y = f(x) into any of the four boxes — the graph redraws as you type. Tick the box at the end of a row to show or hide it; click the coloured dot to change its colour.
- Pan by dragging the graph; zoom with the mouse wheel, a two-finger pinch, or the + and - buttons.
- Trace by moving the mouse over the graph, tapping it, or typing a value in “Trace x”.
- Set an exact window (x min, x max, y min, y max), build a table of values, and copy a link that reopens the same graph.
What you can type
| Type | Meaning |
|---|---|
+ - * / ^ | Add, subtract, multiply, divide, power. x^2 is x squared. |
2x, 3sin(x), (x+1)(x-2) | Multiplication signs may be left out. |
sin cos tan asin acos atan | Trigonometric functions, in radians. |
sqrt cbrt abs | Square root, cube root, absolute value. |
ln log log2 exp | Natural log, base-10 log, base-2 log, ex. |
floor ceil sign min max | Rounding down/up, sign, smaller/larger of several inputs. |
pi, e, a, b, c | Constants π and e, and three slider parameters. |
The usual order of operations applies. Powers are worked out before a leading minus sign, so -x^2 means −(x²): at x = 3 it gives −9, not 9. Powers also stack from the right: 2^3^2 is 29 = 512.
Reading a graph: the key points
A handful of points tell most of a graph's story, and the grapher lists them for the function you select:
- Zeros (x-intercepts) are the x-values where f(x) = 0 — the solutions of the equation f(x) = 0.
- The y-intercept is the point (0, f(0)) where the curve crosses the y-axis.
- Local minima and maxima are the bottoms of valleys and the tops of hills, where the function changes from decreasing to increasing or the other way round.
- Intersections of two functions are the points where f(x) = g(x).
Example: enter f(x) = x^2 - 4. The key points show zeros at x = −2 and x = 2 (because x² = 4), the y-intercept (0, −4) and a minimum at (0, −4). Now enter f(x) = x^2 and g(x) = x + 2: the curves intersect at (−1, 1) and (2, 4). Algebra agrees — x² = x + 2 rearranges to x² − x − 2 = 0, which factors as (x − 2)(x + 1) = 0.
You can confirm roots algebraically with the quadratic equation solver, and intersections of two lines with the system of equations solver.
How the points are found
The grapher does not do algebra. It samples the function at 2,000 x-values across the window, looks for sign changes (a zero) or a value lower or higher than both neighbours (a turning point), and then narrows each one down by repeated halving. The results are numerical approximations, shown to 5 decimal places. A feature much narrower than the sample spacing can be missed — zoom in if you suspect one.
Asymptotes and gaps
Some functions are undefined at certain x-values. 1/x has no value at x = 0 and tan(x) has none at x = π/2 + kπ; near those values the graph shoots off towards ±∞ along a vertical asymptote. A naive plotter joins the two sides with a false vertical line. This grapher tests every steep step by halving the interval: if the jump does not shrink, the curve is broken there and nothing is drawn across the gap. Functions with a restricted domain, such as sqrt(x) or ln(x), are left blank where they are undefined.
Sliders: one formula, a whole family
Use a, b and c inside a formula and sliders appear. In a*sin(b*x) + c, a stretches the wave vertically (amplitude), b squeezes it horizontally (the period is 2π/|b|) and c slides it up or down. In a*x + b, a is the slope — compare with the slope calculator — and b is the y-intercept.
Experiments to try
- Graph
a*x^2 + b*x + c. Which slider moves the parabola without changing its shape? What happens to the zeros as c increases past the point where the curve leaves the x-axis? - Graph
x^3 - 3x. Predict the number of zeros and turning points, then check the key points. Change it tox^3 + 3x— where did the turning points go? - Solve cos(x) = x by graphing
cos(x)andxand reading the intersection. No algebraic formula gives this number. - Graph
sin(x)andx - x^3/6. Zoom in on the origin: for which x-values are the two curves indistinguishable?
Frequently asked questions
How do I graph a function online?
Type the right-hand side of y = f(x), such as x^2 - 4 or 2sin(x), into one of the function boxes. The graph is drawn immediately. Drag to pan, scroll or pinch to zoom, and add up to four functions to compare them.
Does the grapher use degrees or radians?
Radians, like most graphing calculators. One full turn is 2 pi, so sin(x) has period 2 pi, about 6.283. To graph in degrees, convert inside the formula: sin(x*pi/180).
How do I find where two graphs intersect?
Enter both functions, choose one under Key points and the other under “intersect with”. The intersection points inside the current window are listed and marked on the graph. They are numerical approximations rounded to 5 decimal places.
Why does -x^2 give a downward parabola?
By the order of operations, powers are calculated before the minus sign, so -x^2 means -(x^2). At x = 3 that is -9. Type (-x)^2 if you want the square of negative x.
Why is part of my graph missing?
The function is undefined there. For example sqrt(x) and ln(x) only exist for x at or above 0 (above 0 for ln), and x^(1/3) is not computed for negative x — use cbrt(x) instead. Gaps at asymptotes, such as tan(x) at pi/2, are also left open on purpose.
How accurate are the zeros and turning points?
They are found numerically by sampling 2,000 points across the window and refining by bisection, so they are typically accurate to far more than the 5 decimal places shown. Very narrow features between sample points can be missed; zoom in to check.