DevTools Logo

Function Graph Plotter

Function Graph Plotter

Plot y = f(x) with axes, grid and clean gaps at discontinuities — rendered in your browser.

Runs in your browser
Try an example

Function & view

f(x) = expression

Operators + - * / ^. Functions sin, cos, tan, exp, ln, log, sqrt, abs. Constants pi, e. Write 2x or 3sin(x) for multiplication.

Domain (x range)
y range

Graph

712 samples · y -1 to 1 · 0 gaps
Graph of f(x) = sin(x)x from -10 to 10, y from -5 to 5. 712 samples, 0 discontinuities.-10-50510-4-2024

x: -10 to 10 · y: -5 to 5 · 712 samples · 0 gaps

Examples

Sinc function

Enter sin(x)/x, set x from -12 to 12 and y from -1.5 to 1.5 to see the removable hole at x = 0 skipped cleanly.

Parabola roots

Enter x^2-2 and set x from -5 to 5 and y from -3 to 8 to read the two x-intercepts at plus and minus the square root of 2.

Tangent asymptotes

Enter tan(x) with x from -6 to 6: the curve is split at each asymptote instead of drawing a straight line through infinity.

About this tool

Enter an expression such as sin(x)/x or x^2-2 and see y = f(x) drawn as an SVG graph. The parser accepts + - * / ^, implicit multiplication (2x, 3sin(x)), the constants pi and e, and the functions sin, cos, tan, exp, ln, log, sqrt and abs. Set the x domain and y range directly or auto-fit the y axis; undefined values and large jumps such as tan(x) asymptotes become gaps instead of misleading vertical lines. Expressions are interpreted as data in your own browser — no code is executed and nothing is uploaded.

What this tool does not do

  • Processes only the inputs provided in this session without connecting to external accounts or background servers.
  • Runs entirely in the current browser tab; nothing is synced across devices or backed up to a server.

How to use this tool

  1. Enter f(x) expression

    Type a function such as sin(x)/x or x^2 - 2 using standard math notation.

  2. Set x and y axis bounds

    Adjust domain/range limits or auto-fit the vertical axis.

  3. Inspect curve and asymptotes

    Read intercepts and behavior across clean discontinuity gaps.

Use cases

Sinc function

Enter sin(x)/x, set x from -12 to 12 and y from -1.5 to 1.5 to see the removable hole at x = 0 skipped cleanly.

Parabola roots

Enter x^2-2 and set x from -5 to 5 and y from -3 to 8 to read the two x-intercepts at plus and minus the square root of 2.

Tangent asymptotes

Enter tan(x) with x from -6 to 6: the curve is split at each asymptote instead of drawing a straight line through infinity.

Common mistakes

Mistake:How are vertical asymptotes like tan(x) or 1/x drawn?

Fix:Non-finite evaluations and steep sign-flipping jumps break the SVG polyline into separate segments instead of drawing false vertical lines across asymptotes.

Mistake:Does plotting evaluate expressions with JavaScript eval()?

Fix:No. Expressions are parsed into an abstract syntax tree by a dedicated math parser and evaluated safely in your browser.

Frequently asked questions

What mathematical syntax and functions are supported?

Use standard operators (+, -, *, /, ^), implicit multiplication like 2x or 3sin(x), constants pi and e, and functions sin, cos, tan, exp, ln, log, sqrt, and abs.

How are vertical asymptotes like tan(x) or 1/x drawn?

Non-finite evaluations and steep sign-flipping jumps break the SVG polyline into separate segments instead of drawing false vertical lines across asymptotes.

Does plotting evaluate expressions with JavaScript eval()?

No. Expressions are parsed into an abstract syntax tree by a dedicated math parser and evaluated safely in your browser.

How do I zoom in on roots or turning points?

Narrow the x-min/x-max domain and y-min/y-max bounds (or enable y auto-fit) to inspect intercepts at higher resolution.