Function Grapher

Plot up to five real-valued functions, inspect how each expression was parsed, and export a clean graph in your browser.

At a glance

Computes
Plots up to five real-valued functions of x with honest gaps at undefined points.
You supply
Expressions in x, optional domain limits, and the viewport bounds.
Use when
You want to see a function's shape, roots, or extrema in a stated window.
Not for
Solving or simplifying an expression, or fitting a line to data points. Linear Regression Calculator

Runs in your browser. Expressions and graph state are not uploaded.

Functions

Ready

Parsed as: x ^ 2

Ready

Parsed as: sin(x)

Angle mode

Plot

y against x

−10−50510−10−50510Function 1: x ^ 2Function 2: sin(x)
  • Function 1: x ^ 2, solid line
  • Function 2: sin(x), dashed line
Active curves
2 functions shown
Sampling status
Complete at screen resolution
Method
Numeric, viewport-bounded

Graph ready.

Inspect

Roots in the visible window

  • 1.763972e-17. Numeric, viewport-bounded.

Local extrema in the visible window

  • minimum at x = -1.763972e-17, y = 3.111598e-34
Exact viewport and advanced graph settings

Build a transformation

1 * (1 * (x - 0))^2 + 0

Export

Interactive version

Plotting requires JavaScript. The worked graph and method remain available below.

Supported syntax

Use real-valued expressions in x, the constants pi and e, operators, parentheses, and the named elementary functions. The parser rejects assignment, comparison, arrays, units, random functions, and unrestricted code.

Graph multiple functions

Each row stays explicit. A function number, normalized expression, dash pattern, and direct curve label carry identity without relying on color alone.

Restrict the domain

Domain from and Domain to are independently optional. A blank endpoint means there is no explicit restriction on that side.

Graph a piecewise function

Add one expression row per piece and give each row its own domain endpoints. The Piecewise preset loads two rows that meet at zero.

Transformations: shift, stretch, reflect

The transformation builder writes an ordinary expression so every coefficient and shift remains inspectable.

Asymptotes, holes, and honest gaps

The sampler locates singular candidates from the validated syntax tree and emits separate curve segments. It never bridges an undefined point to make a curve look smoother.

Examples

Try a parabola, sine, a removable hole, a square-root boundary, or a floor step. Presets replace graph state; examples remain instructional copy.

Method and assumptions

Findings are numerical and limited to the visible viewport. Roots include visible endpoints; extrema require an interior turning point. Possible asymptotes and hole candidates are worded as numeric evidence, not symbolic proof.

FAQ

How do I graph a function with a restricted domain?

Enter Domain from, Domain to, or both on that function row. A blank endpoint leaves that side unrestricted.

How do I graph a piecewise function?

Use one row per piece and set each row's domain. The Piecewise (two pieces) preset shows the complete arrangement.

Why is there a gap in my graph?

The expression is undefined there, crosses a detected jump, or reached the numeric detail limit. The graph does not bridge such gaps.

Does this solve or simplify equations?

No. It plots explicit real-valued functions and reports numeric points in the visible window.

Radians or degrees?

Radians are the default. Choose Degrees when the trigonometric input or inverse-trigonometric output should use degrees.

How do I graph multiple functions at once?

Use Add function, then enter up to five expressions. Each curve keeps its own number, dash identity, direct label, and optional domain.

Can I save or print the graph?

Use SVG, PNG, print, PDF, JSON, or a local fragment share link. Device storage stays off until you enable it.

Is this a Desmos alternative?

It is a focused browser-only plotter, not a full graphing calculator or computer algebra system.

Why does 2x mean 2*x?

The bounded parser accepts a small set of unambiguous implicit products and shows the normalized expression before plotting.

How the graph is sampled

A restricted parser builds a pure syntax tree. Sampling adds analytic singular candidates, subdivides where screen-space curvature changes, and passes independent segments to the shared curve renderer.

Sources

  1. Expression parsing. math.js. Retrieved .
  2. Security. math.js. Retrieved .