Graphing Calculator: 2D, 3D, Polar, Parametric & Implicit
Graph Cartesian, polar, parametric, and implicit curves with live sliders, roots, and tangents.
This grapher parses expressions with mathjs and plots them in five distinct modes rather than treating every input as y = f(x): Cartesian curves, polar curves r = f(theta), parametric pairs x(t)/y(t), implicit relations F(x,y) = 0, and 3D surfaces z = f(x,y). Roots, intersections, extrema, tangents and definite integrals are computed numerically on whichever curve you have drawn, not looked up from a table of known functions.
How to graph a function online
- Type an expression into the curve row; the page opens with sin(x) already plotted, and the buttons under the list add a new Cartesian, polar, parametric, implicit or 3D surface row.
- Change a row's curve kind from its dropdown. Switching kind loads that mode's starter expression, for example 5*sin(3*theta) for a polar rose.
- Use an extra letter such as a or k to turn part of the expression into a parameter, then drag its slider or press Animate to sweep it.
- Drag the graph to pan and scroll to zoom, then pick a curve in the roots, intersections, extrema, tangent or area tools to analyse what is on screen.
- Copy the address bar to keep or send the graph: curves, colors, slider values and the view window live in the URL.
Five curve kinds, five different sampling strategies
A Cartesian curve is sampled at about 1.4 points per pixel of the 640-pixel canvas (896 samples) across the visible x-range and split into separate line segments wherever the function is undefined or the slope spikes near an asymptote, so a plot of tan(x) shows genuine vertical gaps instead of a spurious connecting line through infinity. Polar curves sample theta 900 times and convert each (r, theta) pair to Cartesian coordinates before drawing. Parametric curves sample t 900 times across whatever t-range you set.
Implicit curves are the odd one out: there is no single y for a given x, so the tool runs marching squares over a 140-by-140 grid, checking every grid cell for a sign change in F(x,y) and stitching the resulting line segments into contours. A 3D surface samples a 42-by-42 grid of z = f(x,y) values and hands that grid to the renderer for shading and rotation. Every one of these five paths runs through the same mathjs-compiled expression, so anything mathjs can parse — trig, logs, absolute value, piecewise definitions via conditional operators — works in any mode.
Graphing calculator syntax and bound variables
- Expressions are parsed by mathjs: ^ raises to a power, * and / multiply and divide, and parentheses group terms. Writing 3*x with an explicit star is the least ambiguous habit.
- Built-in functions include sin, cos, tan and their inverses, sqrt, abs, exp, log (natural logarithm) and log10, with pi and e available as constants.
- A piecewise rule uses the conditional operator, for example x < 0 ? -x : x^2, which draws |x| on the left and a parabola on the right.
- Reserved variable names depend on the mode: x for Cartesian curves, theta (or t) for polar, t for parametric, and x with y for implicit relations and 3D surfaces.
- Any other letter, including multi-letter names, is treated as a parameter and gets its own slider.
How roots, intersections and extrema actually get found
Root finding coarsely samples y = f(x) at 2000 points across the visible range looking for sign changes, then refines each bracket with 60 iterations of bisection — reliable for finding every root the sampling resolution can see, but it can miss a root and its neighbor if both sit inside a single sample interval on a wildly oscillating function. Intersections between two Cartesian curves use the same coarse-sample-then-bisect approach on their difference.
Local extrema are found by sampling the numeric derivative (a central difference with a step of 0.0001) for sign changes, refining the crossing with bisection, then classifying each one as a minimum or maximum from the sign of the second derivative at that point. The tangent line at any point you click uses that same central-difference slope. None of this is symbolic differentiation — it is numerical estimation, which is fast and general but inherits floating-point noise near sharp features.
Area under a curve
Definite integrals are evaluated with Simpson's rule over 2000 subdivisions between the bounds you choose, and the shaded region under the curve is drawn to match. If the function is undefined anywhere inside the interval — a division by zero, a negative number under a square root — the integral comes back as not-a-number rather than a plausible-looking wrong answer, since Simpson's rule has no way to skip over a single bad sample point.
Sliders, parameters, and sharing a graph
- Any letter that appears in an expression but isn't a bound variable (x, y, t, theta) becomes an adjustable slider running from -10 to 10 in steps of 0.1 — type 'a*sin(x)' and a slider for a appears automatically.
- The full set of curves, their expressions, colors and the current view window are packed into the page's URL hash, so a graph can be bookmarked or pasted into a message and the recipient sees the exact same plot, not a blank canvas.
- Everything, including the parser and the numeric analysis, runs in your browser; there is no server call involved in drawing a curve or finding a root.
What this grapher will not do for you
- It never returns a symbolic derivative, antiderivative or exact root — every result here is a numerical approximation, useful for checking work but not a substitute for doing the algebra when an exact closed form matters.
- Root and extrema search only look inside the range you're currently viewing; a root far outside the visible window simply will not appear until you widen the axes.
- Functions with extremely closely spaced roots or extrema below the sampling resolution can be missed entirely — zoom in and re-run the search rather than trusting a single coarse pass on a wide range.
Example graphs to try in each mode
- Cartesian: sin(x) is the starter curve; add tan(x) to see how the plot breaks at each asymptote instead of drawing a vertical line.
- Polar: 5*sin(3*theta) over 0 to 2π traces a three-petal rose of radius 5.
- Parametric: cos(3*t) for x and sin(2*t) for y draws a Lissajous figure; the default pair cos(t), sin(t) is the unit circle.
- Implicit: x^2 + y^2 = 9 is a circle of radius 3 entered exactly as written, and x^2 - y^2 = 1 gives both branches of a hyperbola.
- 3D surface: sin(x)*cos(y) is sampled over the current x and y window; press Show 3D surface and tilt it with the azimuth and elevation sliders.
- Animated: a*sin(x) with Animate pressed on a morphs the amplitude through -10 to 10 and back.
Questions people ask about Interactive 2D/3D Graphing Calculator
- Can I graph an equation like x^2 + y^2 = 9 instead of solving for y first?
- Yes — switch the curve kind to implicit and enter the equation as written, including the equals sign. The tool rewrites 'lhs = rhs' internally as F(x,y) = lhs - rhs and traces the F(x,y) = 0 contour with a grid-based marching-squares search, so you never have to isolate y by hand.
- Why does the tangent line tool give a slightly different slope than my textbook's derivative formula?
- The tangent slope here comes from a numerical central-difference estimate, not from computing the derivative symbolically. For smooth functions the two agree to many decimal places, but very close to a discontinuity or a sharp corner the numerical estimate can drift, since it's really measuring the average slope across a tiny interval rather than an exact limit.
- Does the root finder guarantee it found every root in my window?
- No. It brackets sign changes across 2000 sample points and bisects each bracket, which catches every root a function crosses cleanly, but two roots sitting extremely close together inside one sample gap, or a root that only touches zero without crossing it, can be missed. Narrowing the view and re-running the search is the reliable fix.
- How many curves and sliders can I plot at once?
- There's no hard cap in the code, but each curve keeps its own color from a six-color rotation and every undeclared variable in every expression gets its own -10 to 10 slider, so past five or six curves with several parameters each the panel gets crowded rather than unusable. Performance stays smooth well past that.
- Is this graphing calculator free, and do I need an account?
- It is free and needs no account or sign-in. The code has no usage cap for plotting or analysis, and a graph is saved only in the page address you bookmark or send, not in an online profile.
- Can it graph 3D functions and surfaces?
- Yes, for surfaces of the form z = f(x,y). Add a 3D surface row, then press Show 3D surface; the grid is sampled over the current x and y range and can be turned with the azimuth and elevation sliders.
- Can I animate a graph?
- Yes. Every parameter slider has an Animate button that sweeps the value smoothly between -10 and 10 on a repeating sine cycle of roughly seven seconds, so a*sin(x) or a*x^2 visibly morphs. Press it again to pause at the current value.
- Can I plot data points or a table like Desmos?
- No. This grapher only draws curves defined by an expression; there is no table editor, point list or regression fit. To plot measured data you would need a spreadsheet chart or a grapher that accepts coordinate lists.
Related tools on BrakeTools
- Step-by-Step Symbolic Calculus Solver — See full step-by-step derivatives, integrals, and limits rendered in proper math notation.
- Universal Multi-Variable Formula Solver — Type any formula, leave one variable blank, and solve it numerically via Newton-Raphson.
- Matrix & Linear Algebra Solver — Matrix multiply, invert, and solve linear systems with visible Gaussian-elimination pivot steps.
Content reviewed 2026-09-27.