Skip to main content

Online Graphing Calculator

Plot up to four functions of x on one set of axes, read off the x- and y-intercepts, and check values in a table.

Built for algebra and precalculus students checking homework, and for teachers sketching a curve.

Last updatedHow we build & check our tools
Results will appear here once you enter your values.

How the plot and the intercepts are produced

A graph of y = f(x) is just a list of points joined by lines. This tool picks 800 evenly spaced x-values across your window (801 points including both ends), computes f(x) at each one, and draws a line between neighbors. At the default window of -10 to 10, that is one point every 0.025 units. The gridlines are fixed at tenths of the window, so they tell you scale only when you read the window range printed under the plot.

Your typed text is read by a small hand-written parser that follows the usual order of operations: brackets, then powers, then multiplication and division, then addition and subtraction. Two details trip people up. Powers group from the right, so 2^3^2 means 2^(3^2) = 512. And a minus sign in front binds more loosely than a power, so -2^2 is -4, not 4. Write (-2)^2 if you want 4.

  • X-intercepts: found where the sign of f changes between two sample points, then refined by bisection. A function that is exactly zero at a sample point counts too, which is how the double root of x^2 at 0 is caught.
  • Y-intercept: f(0), shown only when x = 0 is inside the window.
  • Value table: nine rows, evenly spaced from X min to X max. In the default window that means x = -10, -7.5, -5, -2.5, 0, 2.5, 5, 7.5, 10.

Worked example with the default functions

The tool opens with y1 = x^2 - 4 and y2 = sin(x) in a window of -10 to 10 on both axes. For y1 the tool reports x-intercepts at (-2, 0) and (2, 0) and a y-intercept at (0, -4). Check it by hand: x^2 = 4 gives x = 2 or -2, and at x = 0 the function is 0 - 4 = -4. The value table agrees: 96 at x = -10, 21 at x = -5, 2.25 at x = -2.5 and -4 at x = 0.

For y2 = sin(x) the tool lists seven x-intercepts in the window: -9.4248, -6.2832, -3.1416, 0, 3.1416, 6.2832 and 9.4248. Those are the multiples of pi from -3*pi to 3*pi, and the y-intercept is (0, 0). Setting y3 to x^3 - x adds roots at -1, 0 and 1, which is a quick way to see how the number of crossings relates to the degree of a polynomial.

  • Compare two curves: put them in separate boxes and look for where the lines cross. The intercept list covers only the axes, so read crossings from the plot, then zoom in.
  • Check a solution: to solve x^2 - 4 = 5, plot x^2 - 4 and 5 together, or plot x^2 - 9 and read its roots at -3 and 3.
  • Spot a bad window: if a curve seems to vanish, the window may be missing it. For 2^x with Y max of 10, the curve leaves the top of the picture just past x = 3.

Limits, and what the answers are based on

This is a numerical plotter, not a computer algebra system. It does not solve equations symbolically, find turning points, or compute derivatives and areas. Intercepts are estimates from sampled values, and the page says so under each result. A function that touches the axis without crossing, or has two roots closer together than the sample spacing of window width divided by 800, can be missed. Narrow the window and the spacing shrinks.

Implicit multiplication such as 2x or 3(x+1) is rejected with an error rather than guessed, and so are function names without brackets, like sin x. Only functions of x are accepted: there are no sliders, no inequalities, no polar or parametric curves and no equations like x^2 + y^2 = 1.

Sources for the method: the recursive-descent expression parser is the standard textbook technique for arithmetic grammars (Aho, Lam, Sethi and Ullman, Compilers: Principles, Techniques, and Tools, 2nd ed., 2006). Root refinement uses the bisection method, which relies on the intermediate value theorem (Burden and Faires, Numerical Analysis, 9th ed., 2011, section 2.1). Trig functions take radians, as in JavaScript's Math library.

Frequently Asked Questions

Common questions about the Online Graphing Calculator

Use x, numbers, + - * / ^, parentheses, the constants pi and e, and the functions sin, cos, tan, asin, acos, atan, ln, log, sqrt, abs and exp. Multiplication must be written with a star: type 2*x, not 2x. Spaces are ignored and capitals work. Each box holds up to 200 characters, and an empty box is simply skipped.