On this page
How to use the 3D graphing calculator
- Type an equation on a line of the expression list. Start with
z = x^2 - y^2. Each line gets its own colour. - Rotate by dragging, zoom with the scroll wheel or a pinch, pan with a right-drag. Hover to read the (x, y, z) under the pointer. The buttons 3D, Top, Front, Side and Rotate move the camera.
- Press View for axis ranges, contour lines, grid lines, colour by height, opacity and detail level.
- Use Share to copy a link that contains the whole graph, or download a PNG.
This runs in the browser on a phone as well as a laptop. There is no app to install and no sign-in. It draws with WebGL, so any current mobile browser works.
What you can type
| Form | Example | Notes |
|---|---|---|
| Explicit surface | z = sin(x) cos(y) | Also y = f(x,z) and x = f(y,z). Planes work too: z = 3 - x - y, x = 2 |
| Implicit surface | x^2 + y^2 + z^2 = 9 | Any equation in x, y and z |
| Space curve | (cos(t), sin(t), t/4) | t runs 0 to 2π. Change it with {0 < t < 6π} |
| Parametric surface | (u cos(v), u sin(v), u) | u runs 0 to 2π, v runs 0 to π. Override both: {0 < u < 3} {0 < v < 2π} |
| Cylindrical | r = z | r = f(θ, z). Type theta or the symbol |
| Spherical | rho = 2cos(phi) | ρ = f(θ, φ). Type rho, theta, phi |
| Point | (1, 2, 3) | Drawn with a label |
| Vector field | <-y, x, z> | Arrows coloured by magnitude |
| Slider | a = 1 | Then use a in other lines |
Setting the box
Everything is drawn inside a box that starts at -5 to 5 on all three axes. Surfaces are cut cleanly at its walls, so a surface that reaches z = 25 shows a flat top at z = 5. Press View and change the x, y and z minimum and maximum to fit the thing you are studying. Keep the three ranges similar when shape matters, or a sphere turns into an egg.
The math behind it: level curves, critical points and coordinates
Level curves. A contour (level curve) of z = f(x, y) is the set of points where f equals a constant c, that is f(x, y) = c. Tick Contour lines under View and the grapher draws them on the surface and flattens a copy onto the floor of the box. Lines packed close together mean a steep slope; widely spaced lines mean a gentle one.
| Contour pattern | What the surface is doing | Example |
|---|---|---|
| Nested closed loops | A bowl or a hill | z = x^2 + y^2: circles of radius √c, so c = 4 gives radius 2 |
| Hyperbolas that swap direction at c = 0 | A saddle | z = x^2 - y^2 |
Critical points. A critical point is where the gradient ∇f = (fx, fy) is zero. The second-derivative test uses D = fxx·fyy - fxy². If D < 0 it is a saddle. If D > 0 and fxx > 0 it is a local minimum; if D > 0 and fxx < 0 it is a local maximum. If D = 0 the test says nothing, so look at the graph.
Coordinate systems. Cylindrical coordinates use (r, θ, z) with x = r cos θ and y = r sin θ. Spherical coordinates use (ρ, θ, φ) with x = ρ sin φ cos θ, y = ρ sin φ sin θ and z = ρ cos φ. Here θ is the angle around the z-axis (0 to 2π) and φ is the angle down from the positive z-axis (0 to π). Some textbooks swap those two letters, so check your course's convention before you copy a formula.
Three worked examples
1. The saddle z = x² - y² and its contour lines
Set the box to x and y from -3 to 3 and z from -9 to 9. Then f(3, 0) = 9, f(0, 3) = -9 and f(0, 0) = 0.
- Gradient: ∇f = (2x, -2y), which is zero only at the origin.
- Second derivatives: fxx = 2, fyy = -2, fxy = 0, so D = (2)(-2) - 0 = -4. Negative D means a saddle.
With contour lines on, the lowest and highest heights in this box are -9 and 9. The lines fall at every 1.5 from -7.5 to 7.5. The z = 0 line is x² = y², the two straight lines y = x and y = -x crossing at the origin. At z = 4 the contour is x² - y² = 4, a hyperbola with its vertex at (2, 0). At y = 1 it sits at x = √5 ≈ 2.236. At z = -4 the hyperbola opens along y instead: at x = 1 it sits at y = √5.
Hover at (2, 1) and the readout should say z = 3. The gradient there is (4, -2), and the contour through that point has tangent direction (1, 2). Their dot product is 4 - 4 = 0: the gradient is perpendicular to the level curve.
2. Where a sphere meets a plane
Take the sphere x² + y² + z² = 25 (radius 5) and the plane z = 3. On the plane, x² + y² = 25 - 9 = 16, so the intersection is a circle of radius √16 = 4 centred at (0, 0, 3). In general, a plane at distance d from the centre cuts a sphere of radius R in a circle of radius √(R² - d²).
The third line in the loaded example, (4cos(t), 4sin(t), 3), draws that circle as a space curve. Check a point: at t = 1 it is (2.161, 3.366, 3), and 2.161² + 3.366² + 3² = 25. Every point on the curve passes the same test.
Tilt the plane to z = 3 - x - y, which is x + y + z = 3. Its distance from the origin is 3/√3 = √3 ≈ 1.732, so the circle has radius √(25 - 3) = √22 ≈ 4.690.
3. A helix on a cylinder
The curve (2cos t, 2sin t, t/4) for t from 0 to 6π winds three times around a cylinder of radius 2. Every point satisfies x² + y² = 4 cos²t + 4 sin²t = 4, so it stays on that cylinder. The cylinder itself is just r = 2 in cylindrical form.
- Pitch (the rise per full turn): z grows by 2π/4 = π/2 ≈ 1.571 each turn, so it reaches 6π/4 ≈ 4.712 after three.
- Steepness: tan α = 1.571 / (2π × 2) = 0.125, so the helix climbs at about 7.13° from horizontal.
Reading the graph and common mistakes
- Cone in cylindrical form.
r = z {0 < z < 4}is a cone. Its cross-section at height z is a circle of radius z, which is the same as x² + y² = z². Without the brace the grapher uses the whole z range of the box, and negative z draws the mirror half to give a double cone. - A sphere from spherical coordinates.
rho = 2cos(phi)is not centred on the origin. Multiply by ρ: ρ² = 2ρ cos φ, so x² + y² + z² = 2z, which is x² + y² + (z - 1)² = 1. That is a sphere of radius 1 centred at (0, 0, 1). - Vector fields.
<-y, x, z>spins around the z-axis while drifting upward. The arrows sit on a 7 by 7 by 7 lattice inside the box, longer and brighter where the field is stronger. At (1, 2, 3) the magnitude is √(4 + 1 + 9) = √14 ≈ 3.742. The horizontal part is perpendicular to the radius, since (-y, x)·(x, y) = 0. - Half a surface. A parametric surface runs v from 0 to π unless you say otherwise. To revolve a profile fully, add
{0 < v < 2π}. - Radians. RAD is selected by default, so
sin(90)is not 1. Switch the RAD | DEG control to DEG to work in degrees, or read the radians versus degrees guide.
Embed the 3D Graphing Calculator on your website
Teachers, bloggers and course sites can add this tool to any web page for free. Paste the code below into an HTML or embed block (WordPress, Google Sites, Canvas, Moodle, Blogger, Wix). It loads the same tool you see above, without our menus or ads. Please keep the credit line under the frame. Live preview and more sizes: 3D Graphing Calculator widget. Guides for each platform are on the calculator widget page.
Frequently asked questions
Is the 3D graphing calculator free, and does it work on a phone?
Yes to both. It runs in your phone or laptop browser with no app and no sign-in. Share copies a link to your graph, and you can download a PNG.
How do I graph in cylindrical or spherical coordinates?
Type r = f(theta, z) for cylindrical, for example r = z, or rho = f(theta, phi) for spherical, for example rho = 3. You can type the words or the symbols. Add braces such as {0 < z < 4} to limit a range.
How do I plot parametric curves and surfaces in 3D?
Write three expressions in parentheses. With t it is a curve: (cos(t), sin(t), t/4). With u and v it is a surface: (u cos(v), u sin(v), u). To revolve y = x² about the x-axis, try (u, u^2 cos(v), u^2 sin(v)) {0 < u < 2} {0 < v < 2π}.
Can it draw vector fields?
Yes. Type <P, Q, R> using x, y and z, such as <-y, x, z>. Arrows are coloured and sized by magnitude.
How do I see contour lines for z = f(x, y)?
Press View and tick Contour lines. They appear on the surface and as a projection on the floor of the box. The levels are evenly spaced between the lowest and highest height inside your box, so changing the z range changes them.