Graphing Calculator
Plot a function, zoom, and pan β right in your browser, no sign-up needed
What Is This Graphing Calculator?
This graphing calculator plots a single mathematical function on an interactive coordinate grid, right in your browser. Type an equation or pick one from Quick Insert, and the graph updates live as you type β no installation, account, or plugin required.
How to Use It
- Pick a preset from Quick Insert, or type your own expression in the "y =" field.
- The graph updates automatically as you type (or press Enter / click Plot).
- Zoom in or out using the buttons, your scroll wheel, or a pinch gesture on touch devices.
- Drag (or swipe) to pan around the graph.
- Use Reset Graph at any time to return to the default view.
Supported Syntax
Variable: x
Powers: x^2, x^3 (or any power, e.g. x^4)
Functions: sin(x), cos(x), tan(x), log(x) [base 10], ln(x) [natural log], sqrt(x), abs(x)
Operators: + β * / ^ and parentheses ( )
Implicit multiplication: "2x", "2sin(x)", and "(x+1)(x-1)" are understood automatically.
Understanding Gaps in a Graph
Some functions are undefined at certain x-values β tan(x) has repeating vertical asymptotes, and log(x) / ln(x) / sqrt(x) are undefined for non-positive inputs. Rather than drawing an incorrect line across these points, this calculator breaks the curve so the graph stays mathematically accurate.
Controls Reference
Zoom
Zoom In / Zoom Out buttons, mouse scroll wheel, pinch gesture on touch, or the + / β keyboard keys.
Pan
Click-and-drag with a mouse, one-finger swipe on touch, or the arrow keys.
Reset
The Reset Graph button (or the 0 key) returns to the default -10 to 10 view.
Custom View
Advanced Options lets you jump straight to a specific X Min / X Max range instead of zooming manually.
Advantages of This Tool
- Instant, live graph updates with no page reloads.
- No external chart library dependency β pure vanilla JavaScript.
- Full mobile touch support: drag to pan, pinch to zoom.
- Clear error messages if your expression has a typo or unsupported symbol.
Limitations
- Plots one function at a time β no multiple simultaneous graphs yet.
- No parametric, polar, or implicit (non-function) equations in this version.
- Supports a fixed set of functions (x, xΒ², xΒ³, sin, cos, tan, log, ln, sqrt, abs).
Worked Examples
y = xΒ²
Expression: x^2
A classic upward-opening parabola with its lowest point (vertex) at the origin (0, 0), symmetric across the y-axis.
y = sin(x)
Expression: sin(x)
A smooth wave oscillating between -1 and 1, completing one full cycle roughly every 6.28 units (2Ο) along the x-axis.
y = tan(x)
Expression: tan(x)
Shows repeating vertical breaks (asymptotes) where the function is undefined β a good example of how this calculator handles discontinuities.
y = sqrt(x)
Expression: sqrt(x)
Only exists for x β₯ 0, so the curve starts at the origin and rises gradually β everything to the left of x = 0 is correctly left blank.
Frequently Asked Questions
Which functions can I graph?
You can plot combinations of x, x^2, x^3, sin(x), cos(x), tan(x), log(x) (base 10), ln(x) (natural log), sqrt(x), and abs(x), combined with + β Γ Γ· ^ and parentheses. Use the Quick Insert menu to drop in any of these instantly.
Why does my graph have a gap or break in it?
Gaps appear where a function is mathematically undefined at that point β for example, tan(x) is undefined at odd multiples of 90Β°, and log(x) or ln(x) are undefined for x β€ 0. The calculator intentionally breaks the line there instead of drawing an incorrect connecting segment.
Can I type "2x" instead of "2*x"?
Yes β the calculator understands implicit multiplication, so "2x", "2sin(x)", and "(x+1)(x-1)" all work exactly like "2*x", "2*sin(x)", and "(x+1)*(x-1)".
How do I zoom in or out?
Use the Zoom In / Zoom Out buttons, scroll your mouse wheel over the graph, or pinch with two fingers on a touchscreen. You can also press the + and β keys on your keyboard while the graph is focused.
How do I move around the graph?
Click and drag with your mouse, or swipe with one finger on a touchscreen, to pan the view. Arrow keys also pan the graph in small steps.
Why do I get an "Invalid function" error?
This means the expression uses a function or symbol outside the supported set (x, x^2, x^3, sin, cos, tan, log, ln, sqrt, abs) or has a syntax problem like an unmatched parenthesis. Double-check spelling and parentheses, or use Quick Insert for a guaranteed-valid starting point.
Does log(x) mean natural log or base-10 log?
In this calculator, log(x) is base-10 logarithm and ln(x) is the natural logarithm (base e) β the same convention used on most scientific calculators.
Why is sin(x) drawn using radians, not degrees?
Standard mathematical convention (and JavaScript's built-in trigonometric functions) use radians, so sin(x), cos(x), and tan(x) here expect x in radians β meaning a full period of sin(x) spans roughly 6.28 (2Ο) units on the x-axis, not 360.
Can I graph more than one function at once?
Not in this version β this calculator focuses on plotting one function clearly at a time. Multiple simultaneous graphs may be added in a future update.
Does this work on mobile?
Yes β the graph area supports one-finger drag to pan and two-finger pinch to zoom, and the whole page is built mobile-first so it works well on phones and tablets.
Conclusion
Whether you're checking homework, exploring how a function behaves, or just curious what sin(x) or xΒ³ looks like, this graphing calculator gives you an instant, accurate visual β with the zoom and pan controls you'd expect from a professional tool.