Graphing Calculator

Free Online Graphing Calculator with 2D, Contour and 3D Views

A graphing calculator turns an equation into a picture, so you can see where a curve crosses the axes, where it rises or falls, and how it changes as its inputs change. The theMathex online graphing calculator does this in three linked views: a 2D graph for functions of x, a contour map for functions of two variables, and an interactive 3D surface. Next to the graph, an analysis panel calculates derivatives, intercepts and roots for the expression you typed, so the picture and the mathematics stay side by side.

It is free to use, runs in the browser, and is built for students, teachers and anyone who wants to plot functions, explore calculus ideas or check homework visually.

What is the graphing calculator?

theMathex is a collection of step-by-step math calculators covering calculus, algebra and linear algebra. The graphing calculator is its visual workspace. You type an expression into the Algebra panel, and the graph appears immediately. Depending on the form of the expression, it is drawn as a curve on the coordinate plane, as a contour map, or as a 3D surface.

As described on the page, the calculator can plot:

  • functions of one variable, such as y = f(x), including piecewise functions
  • implicit curves, where x and y appear together in one equation
  • inequalities, shown as shaded regions
  • polar graphs and parametric graphs
  • surfaces of the form z = f(x, y), shown as both a contour map and a 3D surface

Sliders let you turn constants into adjustable parameters, and the analysis tools report roots, extrema and other features of the function.

The workspace at a glance

The screen is split into two areas: an input and analysis panel on the left, and the graph canvas on the right.

The left panel

The left panel has three tabs:

  • Algebra is where you write and manage expressions. Each expression sits in a numbered row. A + button and an Add expression row create new lines, and each row has a close button to delete it.
  • Tools holds additional utilities for working with your graph.
  • Spreadsheet provides a table-style workspace for data.

Above the expression list you will find undo and redo arrows, a share icon for sending your work to someone else, and an Examples button with ready-made expressions to try. A Keyboard button at the bottom opens an on-screen math keyboard for typing symbols such as exponents and fractions without hunting for them on a physical keyboard.

Under the expressions, the Analysis section expands to show calculated results for the active expression. It updates as you edit.

The graph canvas

At the top of the canvas, three view buttons switch between 2D Graph, Contour and 3D Surface. On the right edge, a vertical toolbar gives you:

  • a settings (wrench) button for view options
  • zoom in and zoom out
  • a home button that returns to the default view
  • a download button for saving the graph

One expression, three views

The calculator decides where to draw an expression from its form. An equation such as y = f(x) belongs in the 2D Graph. An equation such as z = f(x, y) is a function of two inputs, so it is shown in both the Contour view and the 3D Surface view. The hint under the expression says exactly this: z = f(x, y), shown in the Contour and 3D views.

The small number next to each view button counts how many expressions are currently drawn there. In the 2D example below, the 2D Graph tab shows a 1. In the z = x² − y² examples, the Contour and 3D Surface tabs each show a 1. This makes it easy to see at a glance which view your work lives in.

2D graph: plot functions, piecewise rules and key points

The 2D view is a Cartesian coordinate plane with a labelled x-axis and y-axis, a grid, and smooth curves. You can pan and zoom to inspect any region.

Example: a piecewise function

The screenshot above plots a function defined by three rules, entered as:

y = { x < 0 : −x, x < 2 : x², 4 }

The calculator reads this from top to bottom. When x is less than 0, the value is −x. Otherwise, when x is less than 2, the value is x². In every other case, the value is 4. On the graph this appears as three connected pieces:

  1. a straight line sloping down to the origin for x < 0
  2. a parabola curving up from (0, 0) to (2, 4)
  3. a horizontal line at y = 4 continuing to the right

Marker points appear at (0, 0) and (2, 4), the places where one rule hands over to the next. The pieces meet without gaps, so the function is continuous. The slope, however, changes suddenly at those points. At x = 0 the line has slope −1 on the left while the parabola has slope 0 on the right. At x = 2 the parabola has slope 4 on the left while the flat line has slope 0 on the right. These corners are easy to see on the graph, which is exactly the kind of insight a plot gives that a formula alone does not.

What the analysis panel reports for this graph

ResultValue shownWhat it means
Second derivative f″(x)0 for x < 0; 2 for x < 2; 0 otherwiseThe line and the flat segment have no curvature. The parabola x² has constant curvature of 2.
y-intercept(0, 0)The graph crosses the y-axis at the origin.
Rootsx ∈ {0}The function equals zero only at x = 0.

Because the second derivative is positive only on the parabola segment, that is the only part of the graph that curves upward (is concave up). The other two pieces are straight.

The analysis panel: calculus results next to the graph

Graphing shows the shape of a function. Analysis explains why it has that shape. For each expression, the panel lists results as separate cards, so you can scan them quickly.

For a function of x, the panel can show the y-intercept, the roots (also called zeros or x-intercepts), and derivatives such as the second derivative. For a function of two variables, as in the example below, it shows:

  • Partial derivatives with respect to x and with respect to y
  • the gradient vector
  • the Hessian determinant, used to classify critical points

The page description also lists extrema among the features, which means the calculator can point out maximum and minimum values where they exist.

Contour plot: see a surface as a map

A contour plot is a flat map of a surface. Each curve, called a contour line or level curve, connects all the points where a function of two variables has the same value. It works like a topographic map, where lines join points of equal elevation. Here the height is the value of z.

In theMathex, any expression of the form z = f(x, y) appears in the Contour view. We'll use z = x² − y² as the example, because it shows several important features at once.

How to read the contour view

  • Labelled contour lines. Each line carries its z-value, such as −10, −5, 0, 5, 10, 15, 20, 25 and 30. Lines that are close together mean z changes quickly, and lines that are far apart mean z changes slowly.
  • Colour scale. A legend maps colour to height. For this example it runs from about −10 at the dark end to 30 at the warm end, so you can estimate z at any point without reading every label.
  • The X-shaped zero contour. The z = 0 level is the pair of straight lines y = x and y = −x. They cross at the origin and divide the plane into four regions.
  • Hyperbola-shaped level curves. Where z is positive, the curves open to the left and right. Where z is negative, they open upward and downward.
  • Gradient arrows. The arrows overlaid on the map show the direction of the gradient, which is the direction in which z increases fastest. For this function they point away from the centre along the x-axis and toward it along the y-axis, which is the signature of a saddle.
  • Saddle marker. A labelled point at (0, 0) marks the saddle point.

Why the origin is a saddle point

The analysis panel gives the numbers behind the picture:

QuantityResultInterpretation
∂f/∂x2xHow z changes as x changes, with y held fixed
∂f/∂y−2yHow z changes as y changes, with x held fixed
Gradient ∇f⟨2x, −2y⟩The vector of steepest increase
Hessian determinant D−4A negative value signals a saddle point

Both partial derivatives are zero at (0, 0), so the origin is a critical point. The second derivative test then uses the Hessian determinant: since f_xx = 2, f_yy = −2 and f_xy = 0, the determinant is D = (2)(−2) − 0² = −4. A negative D means the surface curves up in one direction and down in another, so the point is neither a maximum nor a minimum. It is a saddle point, exactly as the map and the marker show.

3D surface: rotate, rescale and recolour

The 3D Surface view draws z = f(x, y) as a solid, interactive surface inside a bounded box with labelled x, y and z axes. You can rotate it to look at the surface from any angle and zoom in on details. The saddle point is marked directly on the surface,

3D settings explained

Opening the settings (wrench) button reveals a 3D settings panel with these controls:

  • Camera presets: Iso, Top, Front and Side. Iso gives a three-dimensional overview. Top looks straight down and resembles the contour map. Front and Side show the profile of the surface along one axis.
  • Domain: x min, x max, y min and y max set the region that is plotted. The screenshot shows −1.5 to 1.5 on both axes. Narrowing the domain zooms in on a feature. Widening it shows the global shape.
  • Auto z range: when switched on, the vertical scale adjusts to fit the surface automatically.
  • Resolution: a slider that controls how finely the surface is sampled. The screenshot shows a value of 120. Higher values give a smoother surface, while lower values draw faster on slower devices.
  • Colouring: choose Height map, which colours by z-value, or Expression colour, which uses the colour assigned to the expression.
  • Colormap: theMathex, Viridis, Plasma, Inferno, Turbo and Spectral are visible in the panel, with more available by scrolling. The screenshot uses Viridis, a perceptually uniform colormap that remains readable for most forms of colour-vision deficiency.

How to use the graphing calculator

  1. Enter an expression in the Algebra panel. Use the on-screen keyboard for exponents, roots and symbols. For a one-variable graph, type something like y = x². For a surface, type z = x² − y².
  2. Check the view. Your graph appears in the 2D Graph view or in the Contour and 3D Surface views, depending on the form of the expression.
  3. Pan and zoom. Use the zoom buttons or your mouse or touch gesture to inspect a region. Press the home button to return to the default view.
  4. Read the analysis. Scroll the Analysis section for intercepts, roots, derivatives, the gradient and the Hessian determinant.
  5. Adjust the 3D settings. Change the domain, resolution, camera and colormap to focus on what matters.
  6. Add more expressions. Use Add expression to compare several functions or build up a model.
  7. Save or share. Use the download button to export the graph and the share icon to send your work to a classmate or student.

If you are not sure where to start, the Examples button loads ready-made expressions you can explore and edit.

Why graphing helps you understand math

A formula describes a relationship, but a graph lets you see it. Some of the ideas this calculator makes visible:

  • Roots and intercepts appear as the points where a curve meets the axes.
  • Slope and curvature show up as how steeply and how sharply a curve bends.
  • Piecewise behaviour appears as separate segments, with corners where the rules change.
  • Level curves and gradients turn multivariable calculus from abstract notation into something you can look at.
  • Critical points, including maxima, minima and saddle points, appear as visible features that you can check against the Hessian.

Seeing the picture and the calculation together helps you catch mistakes, such as a sign error in a derivative, and build intuition you can carry into exams and real problems.

Who is it for?

  • Algebra and pre-calculus students plotting lines, parabolas and other functions to find roots and intercepts.
  • Calculus students checking derivatives, concavity and multivariable concepts such as partial derivatives, gradients and the second derivative test.
  • Teachers and tutors who want a clear visual to explain a concept live or share with a class.
  • Engineers, data analysts and hobbyists who want to inspect a function of two variables as a contour map or surface.

Frequently asked questions

What is an online graphing calculator?

An online graphing calculator is a web-based tool that plots equations and functions on a coordinate system. You type an expression, and the tool draws its graph and often calculates features such as intercepts and derivatives.

Is this graphing calculator free?

Yes. The graphing calculator is a free online tool, described on the page as a free online graphing calculator.

Can it graph 3D functions?

Yes. A function of the form z = f(x, y) is shown in the 3D Surface view as an interactive surface, and in the Contour view as a level-curve map.

What is the difference between a contour plot and a 3D surface?

A 3D surface shows height as an actual vertical dimension that you can rotate. A contour plot flattens the same function into a map where lines connect points of equal height. They show the same function in two complementary ways, and our tool gives you both from one expression.

How do I graph a piecewise function?

Write each condition followed by its rule, with a final default value, inside braces. For example, y = { x < 0 : −x, x < 2 : x², 4 } uses −x for x less than 0, x² for x less than 2, and 4 everywhere else.

How do I find the roots or intercepts of a function?

Enter the function and open the Analysis section. For the piecewise example above, the panel lists the y-intercept as (0, 0) and the root as x = 0.

What does a saddle point mean?

A saddle point is a critical point that is neither a local maximum nor a local minimum. The surface rises in one direction and falls in another. In the example z = x² − y², the Hessian determinant is −4 at the origin, which confirms a saddle.

Can I change the colours and detail of a 3D graph?

Yes. The 3D settings panel lets you choose between a height map and expression colour, pick a colormap such as Viridis or Plasma, and adjust the resolution.

Can I share or save my graph?

Yes. A share icon in the Algebra panel lets you pass your work on, and a download button on the graph toolbar saves the graph.

Explore related calculators on theMathex for derivatives, equation solving and linear algebra, piecewise function and read the blog and Math Formulas section for the concepts behind each graph.