๐Ÿ“ˆ

Function Graphing Calculator

Plot mathematical functions (polynomial, trigonometric, exponential). Graph up to 3 functions simultaneously.

MATHEMATICS

Plot mathematical function graphs visually right in your browser.

Supports up to 3 functions at once with different colors. Handles polynomial, trigonometric, logarithmic, and exponential functions. Detects x-axis intercepts, value tables, and 8 preset example functions.

Graph Calculator

Plot up to 3 mathematical functions simultaneously. Enter function expressions, set the range, then click "Draw Graph".

Operators: +, -, *, /, ^ (power)ย |ย Functions:sin, cos, tan, sqrt, abs, log, log10, exp, floor, ceil ย |ย Constants: pi, e

Calculator information

How to use this calculator

  1. Enter f(x) using standard syntax (e.g., x^2, sin(x), 2*x+3, log(x)).
  2. Add up to 3 functions at once to compare graphs (colors are assigned automatically).
  3. Set the X-axis range (xmin, xmax) and let the Y-axis autoscale or set it manually.
  4. Click 'Plot' to render the graph to the canvas.
  5. Inspect X-axis intercepts (roots) and the value table at key points.
  6. Use the 8 preset example functions for quick exploration (parabolas, sines, exponentials, etc.).

2D function plotting and X-axis intercepts

Canvas point: (x_pixel, y_pixel) = ((x - xmin)/(xmax - xmin) * W, H - (f(x) - ymin)/(ymax - ymin) * H)
  • f(x): the function being plotted
  • xmin, xmax: X-axis range
  • ymin, ymax: Y-axis range
  • W, H: canvas width and height in pixels
  • X-axis intercepts: solutions to f(x) = 0 (roots of the function)

Roots can be found numerically with bisection or Newton-Raphson. This plotter samples at high resolution (~1,000 points) for smooth curves.

Worked example: Plotting a parabola and finding its intercepts

Given:
  • Function: f(x) = x^2 - 4
  • X range: -5 to 5
  • Shape: upward-opening parabola with vertex at (0, -4)
Steps:
  1. Sample 100+ points between -5 and 5, computing y for each x
  2. Convert each (x, y) to canvas coordinates and connect with line segments
  3. Find X intercepts: x^2 - 4 = 0 -> x = +/-2
  4. Find Y intercept: f(0) = -4
  5. Value table: f(-2) = 0, f(0) = -4, f(2) = 0, f(3) = 5

Result: f(x) = x^2 - 4 crosses the X axis at (-2, 0) and (2, 0), and the Y axis at (0, -4).

Frequently asked questions

How does the plotter handle discontinuous functions like tan(x)?
tan(x) has vertical asymptotes at x = pi/2 + k*pi. Plotters often draw spurious vertical lines at these discontinuities because they connect samples on either side of the asymptote. Higher-quality plotters detect large jumps between consecutive samples and break the line. For best results, restrict the X range to avoid spanning asymptotes.
What is the difference between x^2 and x**2 in function syntax?
Both represent x squared in most modern plotters, following Python and several scripting languages. Traditional math notation uses x^2 (superscript). Always use explicit multiplication (2*x, not 2x) in plotters with strict parsers, and use parentheses around function arguments: sin(x), not sinx.
How many sample points does the plotter use?
Web plotters typically use 500-2,000 sample points across the plotting range to balance accuracy and performance. Functions with fast oscillations like sin(100x) require denser sampling or adaptive sampling (more points where the slope changes quickly). Desmos and GeoGebra use adaptive sampling for the best visual quality.
How do you find roots numerically?
Bisection repeatedly halves an interval until it finds a point where f(x) = 0 within a chosen tolerance. Newton-Raphson is faster but needs the derivative f'(x): x_{n+1} = x_n - f(x_n)/f'(x_n). For simple cases, factoring or closed-form formulas (quadratic formula for ax^2+bx+c=0) give exact analytic solutions.
Does the plotter recognize the constants pi and e?
Yes. Modern plotters accept pi (3.14159...) and e (2.71828...). Examples: sin(pi*x) or e^x. Use them as constants, not variable names - avoid declaring 'e' as a separate variable since it would clash with Euler's number. For degrees, convert manually: sin(x * pi / 180).

Last updated: May 11, 2026