Graphing Calculator
Plot and visualize mathematical functions with this graphing calculator. Supports multiple functions, zoom, pan, and common math operations.
Plot up to five mathematical functions simultaneously on an interactive canvas. Type expressions like x^2, sin(x), or 1/x using standard mathematical notation. Zoom, pan, and hover over the graph to read exact coordinates at any point. The parser supports arithmetic operators, trigonometric and inverse trig functions, logarithms, square roots, absolute value, and the constants PI and E.
About Graphing Calculator
Supported Functions and Syntax
The expression parser accepts standard mathematical notation. Write multiplication explicitly with * or use implicit multiplication (2x is the same as 2*x). Parentheses control evaluation order as expected.
| Category | Available | Example |
|---|---|---|
| Arithmetic | +, -, *, /, ^ | x^2 + 3*x - 5 |
| Implicit multiply | Coefficient before x | 2x, 3x^2 (same as 2*x, 3*x^2) |
| Trigonometric | sin, cos, tan | sin(x), 2*cos(3x) |
| Inverse trig | asin, acos, atan | asin(x), atan(x/2) |
| Roots and powers | sqrt, ^ | sqrt(x), x^(1/3) |
| Logarithmic | log (base 10), ln (base e) | log(x), ln(x+1) |
| Exponential | exp | exp(-x^2) |
| Other | abs, ceil, floor | abs(x), floor(x) |
| Constants | PI, E | sin(PI*x), E^x |
How Does a Graphing Calculator Work?
A graphing calculator evaluates a function f(x) at hundreds of evenly spaced x-values across the visible window, then connects the resulting (x, y) points into a smooth curve. This tool samples 1,200 points across the current x-range. At each point the parser converts the expression string into an abstract syntax tree (AST) and evaluates it safely without dynamic code execution, so only supported mathematical operations can run.
Worked example with x^2 - 3x + 2: At x = 0 the function returns 0 - 0 + 2 = 2, giving point (0, 2). At x = 1 the result is 1 - 3 + 2 = 0, giving the root (1, 0). At x = 2 the result is 4 - 6 + 2 = 0, giving the second root (2, 0). At x = 1.5 (the vertex) the result is 2.25 - 4.5 + 2 = -0.25, the minimum value. Connecting these points and hundreds more produces the downward-then-upward parabola shape on screen.
Major Function Families
Mathematics broadly classifies functions into algebraic functions (built from arithmetic and powers) and transcendental functions (trigonometric, exponential, logarithmic). Each family has a distinctive graph shape that makes it easy to identify visually.
| Family | General Form | Graph Shape | Example to Plot |
|---|---|---|---|
| Linear | mx + b | Straight line with slope m | 2x + 1 |
| Quadratic | ax^2 + bx + c | U-shaped parabola (or inverted if a < 0) | x^2 - 4 |
| Cubic | ax^3 + bx^2 + cx + d | S-shaped curve with up to 2 turning points | x^3 - 3*x |
| Rational | p(x)/q(x) | Curves with vertical asymptotes where q(x) = 0 | 1/x |
| Root | x^(1/n) | Starts at origin, grows slowly | sqrt(x) |
| Exponential | a^x | Rapid growth (a > 1) or decay (0 < a < 1) | E^x |
| Logarithmic | log(x) or ln(x) | Slow growth, only defined for x > 0 | ln(x) |
| Sine/Cosine | a*sin(bx + c) | Repeating wave, period 2*PI/b, amplitude a | sin(x) |
| Tangent | tan(x) | Repeating S-curves with vertical asymptotes | tan(x) |
| Gaussian | exp(-x^2) | Bell-shaped curve centred on the y-axis | exp(-x^2) |
Understanding Graph Features
When analysing any function's graph, six key features reveal its behaviour. Learning to spot these visually is essential for algebra, pre-calculus, and calculus courses.
| Feature | What to Look For | Example |
|---|---|---|
| Roots (zeros) | Where the curve crosses the x-axis (f(x) = 0) | x^2 - 4 crosses at x = -2 and x = 2 |
| Y-intercept | Where the curve crosses the y-axis (x = 0) | x^2 + 3 has y-intercept at 3 |
| Maxima/minima | Peaks and valleys where the slope changes sign | sin(x) peaks at y = 1, troughs at y = -1 |
| Asymptotes | Lines the curve approaches but never reaches | 1/x approaches y = 0 and x = 0 |
| Symmetry | Even functions: f(-x) = f(x). Odd functions: f(-x) = -f(x) | x^2 is even, x^3 is odd |
| Periodicity | Pattern repeats at regular intervals | sin(x) repeats every 2*PI (about 6.28) |
Roots are especially important because they represent solutions to the equation f(x) = 0. To find roots algebraically rather than visually, the equation solver handles linear, quadratic, and systems of equations. For a deeper look at parabola roots using the discriminant, try the quadratic formula calculator.
How Do Function Transformations Work?
Plotting two functions side by side is the best way to understand transformations. Starting from a base function f(x), four types of transformation change the graph's position and shape:
Vertical shift: f(x) + k moves the entire graph up by k units (or down if k is negative). Plot x^2 and x^2 + 3 to see the parabola shift upward by 3.
Horizontal shift: f(x - h) moves the graph right by h units. Plot x^2 and (x-2)^2 to see the vertex slide from (0, 0) to (2, 0). Note the counterintuitive sign - subtracting 2 inside the function moves it right, not left.
Vertical stretch/compress: a*f(x) scales the height. When a > 1 the graph stretches taller; when 0 < a < 1 it compresses. Plot sin(x) and 3*sin(x) to compare amplitudes.
Horizontal stretch/compress: f(bx) scales the width. When b > 1 the graph compresses horizontally; when 0 < b < 1 it stretches. Plot sin(x) and sin(2x) - the second wave completes a full cycle in half the distance.
Reflection: -f(x) flips vertically across the x-axis. f(-x) flips horizontally across the y-axis. Plot x^2 and -x^2 to see a downward-opening parabola.
Combining transformations follows a specific order. Inside the function (horizontal changes), operations apply in reverse order of arithmetic. Outside the function (vertical changes), operations apply in the standard order.
Comparing Growth Rates
One of the most instructive exercises is plotting functions with different growth rates on the same axes. Add three functions - x, x^2, and E^x - and zoom out to see how they diverge:
| x | x (linear) | x^2 (polynomial) | E^x (exponential) |
|---|---|---|---|
| 1 | 1 | 1 | 2.72 |
| 2 | 2 | 4 | 7.39 |
| 5 | 5 | 25 | 148.41 |
| 10 | 10 | 100 | 22,026 |
| 20 | 20 | 400 | 4.85 * 10^8 |
By x = 10 the exponential is already 220 times larger than the polynomial. By x = 20 the gap is enormous. This illustrates why computer scientists care about algorithmic complexity - an O(2^n) algorithm becomes impractical far sooner than an O(n^2) one. The logarithm ln(x) grows even slower than linear x, which is why O(log n) algorithms like binary search are so efficient.
Why Do Functions Have Gaps or Asymptotes?
Gaps appear where a function produces a non-real or infinite result. The grapher skips those points rather than drawing a misleading line through them.
| Function | Undefined At | Reason |
|---|---|---|
| 1/x | x = 0 | Division by zero produces infinity |
| sqrt(x) | x < 0 | Square root of a negative number is not real |
| log(x) | x <= 0 | Logarithm only defined for positive inputs |
| tan(x) | x = PI/2, 3*PI/2, ... | cos(x) = 0 at these points, causing division by zero |
| asin(x) | |x| > 1 | Sine output is always between -1 and 1 |
Vertical asymptotes (like x = 0 for 1/x) are places where the function shoots toward positive or negative infinity. Horizontal asymptotes (like y = 0 for 1/x as x grows large) show the value the function approaches but never quite reaches. Plotting 1/(1 + E^(-x)) shows both a horizontal asymptote at y = 0 on the left and y = 1 on the right - this is the logistic (sigmoid) function used in statistics and machine learning.
Graphing Calculators in Education
Graphing calculators have been a core part of maths education since Texas Instruments released the TI-81 in 1990. The TI-84 series, introduced in 2004, became the standard in American classrooms, and TI has sold over 90 million graphing calculators since 1990. The landscape has shifted significantly toward free digital tools. Desmos, launched around 2012 by Eli Luberoff, is now the built-in calculator for the digital SAT and all 2026 AP Exams that permit calculator use (College Board, 2025-26 policy). In August 2025, the College Board banned all CAS (Computer Algebra System) calculators from the SAT, pushing students further toward standard graphing tools.
This browser-based graphing calculator covers the same core functionality needed for coursework and exam preparation - plotting functions, identifying roots, observing transformations, and comparing function families. For trigonometry-specific work, the unit circle reference provides visual angle-to-value mappings, and the trig functions calculator evaluates exact values at standard angles.
Tips for Effective Graphing
- Start with the default window. The -10 to 10 range on both axes works well for most polynomial, rational, and trig functions. Zoom in or out after the initial plot.
- Use Auto Y-axis to let the calculator pick a vertical range that shows all plotted values. Turn it off when comparing functions that need a fixed scale.
- Check roots visually. Where the curve crosses the x-axis, the function equals zero. Hover over those crossings to read the approximate x-value.
- Explore transformations by plotting pairs. Enter x^2 in the first slot and (x-3)^2 + 2 in the second to see a shift of 3 right and 2 up.
- Watch for asymptotic behaviour. If the graph appears to shoot off the screen near a certain x-value, that is likely a vertical asymptote where the function is undefined.
- Compare growth rates. Plot x, x^2, and E^x together. Zoom out to x = 20 to see how dramatically exponential growth outpaces polynomial growth.
- Use scroll wheel to zoom. Scrolling up zooms in (narrower range, more detail) and scrolling down zooms out. Click and drag to pan around after zooming in.
- Look for intersections. Where two plotted curves cross, those x-values satisfy f(x) = g(x). Hover near the crossing to read the approximate coordinates.
Common Graphing Mistakes to Avoid
A few errors come up repeatedly when students first start graphing functions:
- Confusing horizontal shift direction. The function (x - 3)^2 shifts right by 3, not left. The subtraction inside the parentheses is counterintuitive. Plot x^2 alongside (x - 3)^2 to confirm this visually.
- Forgetting implied multiplication. Writing 2x works, but writing xy or xx does not - this tool only supports x as the variable. Use 2*x if you want to be explicit.
- Misreading the window range. A function might appear flat or missing simply because the y-range does not include the values the function produces. Toggle Auto Y-axis on to fix this.
- Expecting tan(x) to be continuous. Tangent has vertical asymptotes at every odd multiple of PI/2. The gaps in the graph are correct, not errors.
- Ignoring domain restrictions. Entering sqrt(x) and seeing nothing for negative x is expected. The function genuinely does not produce real values there.
All rendering and computation run entirely in the browser. No data leaves the device, and the expression parser uses a safe AST approach with no dynamic code execution.
Sources
Frequently Asked Questions
What functions can I graph?
You can graph any combination of basic operators (+, -, *, /, ^), trigonometric functions (sin, cos, tan), and other common functions like sqrt, abs, log (base 10), ln (natural log), and exp. Constants PI and E are also supported.
How do I plot multiple functions at once?
Click the '+ Add function' button to add up to 5 functions. Each one is plotted in a different color so you can compare them on the same graph.
Can I zoom and pan on the graph?
Yes. Use the Zoom In and Zoom Out buttons, scroll with your mouse wheel, or click and drag to pan around. You can also set exact X and Y ranges in the controls below the graph.
What does auto Y-axis do?
When Auto Y-axis is checked, the calculator automatically adjusts the vertical range so all plotted values are visible. Turn it off to set custom Y min and max values.
Why does my function show a gap?
Gaps appear where the function is undefined or produces infinite values. For example, 1/x has a gap at x=0 because division by zero is undefined, and sqrt(x) has no values for negative x.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/graphing-calculator/" title="Graphing Calculator - Free Online Tool">Try Graphing Calculator on ToolboxKit.io</a>