What this tool does
The Interactive Graphing Calculator lets you plot up to four mathematical functions simultaneously on a coordinate plane. Unlike a basic graph plotter, this tool adds parameter sliders, automatic intersection detection, smooth zoom and pan, and preset examples so you can explore function behavior interactively without writing any code.
Type any expression involving x into the function input fields, use the a and b sliders to adjust parameters in real time, and watch the graph update instantly. Zoom in with the scroll wheel or pinch on mobile to inspect fine detail, or zoom out to see the big picture.
How the graph is rendered
Each function is evaluated at hundreds of sample points across the visible x-range. The results are connected with smooth line segments drawn on an HTML5 canvas. Discontinuities (like vertical asymptotes or undefined values) are handled automatically: the curve lifts its pen wherever the output is not a finite number, preventing false lines across breaks.
Grid lines and axis labels update dynamically as you zoom so the scale stays readable at every level of magnification.
Finding intersections
Intersection detection works by scanning the visible x-range for sign changes in the difference f1(x) − f2(x). When the difference flips sign between two consecutive sample points, a bisection algorithm narrows down the crossing to within 1e-10 in x. This finds roots of transcendental equations that have no closed-form solution, such as where sin(x) meets x/3.
Results appear in a grid below the graph showing each point's (x, y) coordinates. Intersection dots are also drawn on the canvas so you can see them in context.
Parameter sliders
The a and b sliders range from −5 to 5 and can be used inside any expression. For example:
- Enter \`a*sin(b*x)\` to control amplitude and frequency simultaneously - Enter \`x^2 + a*x + b\` to explore how the coefficients of a parabola shift its vertex - Enter \`a*exp(-b*x^2)\` to visualise a Gaussian bell curve
Moving a slider immediately re-plots all functions and recalculates intersections, making it easy to explore families of curves dynamically.
Supported expressions
The built-in expression parser supports:
**Operators:** + − * / ^ (exponentiation)
**Functions:** sin, cos, tan, asin, acos, atan, sqrt, abs, log (natural), log2, log10, exp, floor, ceil, round
**Constants:** pi (or π), e
**Variables:** x, a, b
Expressions are evaluated left to right with standard operator precedence. Parentheses can be nested arbitrarily. Examples: \`sin(pi*x)\`, \`sqrt(x^2 + 1)\`, \`abs(x) - x/2\`, \`a*x^3 - b*x\`.
How to use
1. Type a mathematical expression in the first function field, for example \`sin(x)\`. 2. Click **+ Add** to enter a second function and compare curves side by side. 3. Drag the **a** and **b** sliders to change parameter values and watch the graph update live. 4. Scroll the mouse wheel over the graph to zoom in or out. Drag the graph to pan. 5. On mobile, use one finger to pan and two fingers to pinch-zoom. 6. Check the **Intersection Points** section below the graph to see where the curves cross. 7. Click a preset button to load a ready-made example and explore it from there. 8. Click the reset button (⟳) in the top-right corner of the graph to return to the default view.
FAQs
Q: Why does my curve show a gap or jump? A: The parser returns NaN for undefined values (like sqrt of a negative number or division by zero), and the renderer lifts the pen at those points. This is correct mathematical behavior, not a bug.
Q: Can I use degrees instead of radians? A: The calculator uses radians, matching standard mathematical convention. To convert, multiply your angle by pi/180. For example, \`sin(x * pi / 180)\` treats x as degrees.
Q: How many functions can I plot at once? A: Up to four functions can be active at the same time, each shown in a different color.
Q: Why are some intersections missing? A: The bisection algorithm finds crossings within the current visible view. If a crossing is outside the current x-range, pan or zoom out until you can see it, and the point will appear.
Q: What does the color dot next to each function input do? A: Clicking it toggles that function on or off without removing its expression. This is useful for hiding one curve temporarily to see others more clearly.
Q: Can I plot implicit equations like x^2 + y^2 = 1? A: No. This tool plots explicit functions of the form y = f(x) only. For implicit curves, rearrange to y = ... where possible.
Q: What is the difference between log and log10? A: \`log(x)\` computes the natural logarithm (base e). Use \`log10(x)\` for base-10 or \`log2(x)\` for base-2.
Explore Similar Tools
Explore more tools like this one:
- Graph Plotter — Plot mathematical functions on an interactive coordinate... - Completing the Square Calculator — Solve quadratic equations by completing the square with... - Quadratic Roots Calculator — Solve quadratic equations (ax² + bx + c = 0) using the... - Vertex Form Calculator — Convert quadratic equations to vertex form and visualize... - Add Calculator — Add multiple numbers together quickly and easily. Simple...