Graphing Calculator

A graphing calculator that plots one or two functions of x, or inequalities with the satisfying region shaded, over a window you control. It parses expressions safely (nothing you type is ever executed as code), samples densely and breaks the curve honestly at poles and jumps instead of drawing the fake vertical lines many plotters produce, finds intercepts and intersection points numerically and refines them by bisection, and finishes with a values table and a downloadable PNG of the graph.

Syntax: powers as x^2, multiplication as * or by juxtaposition (2x, 2(x+1)), and the functions sin, cos, tan, asin, acos, atan, exp, ln, log (base 10), sqrt and abs, plus pi and e. Strict inequalities (<, >) draw a dashed boundary; non-strict (≤, ≥) draw it solid, the standard convention.

How to use this calculator

  1. Enter a function of x in the first field and click Plot. Add a second function to compare curves or to solve two equations against each other visually.
  2. For an inequality, choose its relation: the region where y satisfies it is shaded cell by cell, and with two inequalities the shading is their overlap, the system solution.
  3. Set the window when the action is elsewhere: x and y ranges are yours. Zoom by shrinking the ranges around the feature (a root near 1.4 wants, say, x from 0 to 3, not −10 to 10).
  4. Read the numbers under the graph: x-intercepts, the y-intercept, and intersection points are computed, not eyeballed, and the values table gives exact plotted values across the window.
  5. Download the finished graph as a PNG for documents and homework.

The method

Safe parsing, dense sampling

The expression is parsed into a tree by a real parser and evaluated from that tree; typed text is never run as code. The curve is sampled at 400 intervals across the window, and breaks are inserted wherever the function is undefined (a pole, a logarithm of a negative) or jumps by more than the window can honestly draw. That is why 1/x appears as two separate branches with a gap at the axis, instead of the near-vertical smear a naive plotter connects across the pole.

Intercepts and intersections

Roots are located by scanning the samples for sign changes (or an exact zero), then refined by bisection to about ten decimal digits, far past the displayed precision. Intersections of two functions are the roots of f − g, found the same way. One honest limitation follows from the method: a curve that only touches the axis without crossing (the vertex of x² sitting exactly on it) registers only if a sample lands on it, which the results note when no roots are found.

Inequality shading

The plot area is divided into a fine grid of cells; each cell’s centre is tested against every active inequality, and cells passing all of them are shaded. For y < f(x) that is the region below the curve; with two inequalities it is the overlap, the graphical solution of the system. Near the boundary the shading is as coarse as one cell, which the limitations state plainly.

Worked examples

Example 1: the preloaded parabola

f(x) = x² over the default window draws the standard parabola with its vertex at the origin, y-intercept 0, and the axis touched at x = 0. Try x² − 2 next: intercepts appear at ±1.414214, the computed √2 with its sign.

Example 2: intersections

f(x) = x against g(x) = x² − 2 meet where x² − x − 2 = 0: the points (2, 2) and (−1, −1), listed numerically under the graph, matching the closed-form solution exactly.

Example 3: two branches, honestly

f(x) = 1/x has no intercepts and no y-intercept (it is undefined at 0), and the plot shows the two branches approaching the axes without touching or connecting. A plotter that joins them is drawing a line that is not part of the function.

Example 4: a system of inequalities

f(x) = x with relation ≥ and g(x) = 4 − x with relation ≤ shade the wedge where y is at least x and at most 4 − x: a lens closing at their intersection (2, 2). One inequality shades a half-region; two shade their overlap, which is the system’s solution set.

Example 5: absolute value

f(x) = abs(x − 2) draws the V with its corner at (2, 0), touching the axis there. Corners and cusps plot correctly because sampling follows the function, not an assumed smoothness.

Reading your results

The graph is an argument, the numbers are the verdict. Shape, growth and symmetry come from the picture; intercepts and intersections should be quoted from the computed list, which carries bisection-refined values, not from reading pixels against the grid.

The window decides what exists. A root at x = 40 is invisible in a ±10 window, and the intercept list covers only the window shown. Widen before concluding a function has no roots; the tool reports what it searched, not what exists in principle.

A gap is information. Breaks in the curve mark where the function is undefined or leaves the window: poles, domain edges (sqrt and ln begin where their arguments allow), and jumps. A continuous-looking line across such a point on another tool is the error, not the standard.

Common mistakes

  • Trusting the default window. Behaviour at scale (a cubic’s ends, an exponential’s wall) and behaviour in miniature (roots close together) both hide in the wrong window. Set the ranges to the question being asked.
  • Reading values off pixels. The grid is a guide; the tables are the values. An intersection that looks like (2, 2) may be (2.0003, 1.9997); quote the computed list.
  • Flipping an inequality when rewriting it. The relations here are y against f(x). Entering a region meant as x > something into a y-form shades a different set; rewrite the inequality solving for y first.
  • Assuming no crossing means no root. A tangent touch (a double root) may not produce a sign change, as the method section explains. If the algebra suggests a touching root, check the values table around it.
  • Drawing through a pole mentally. 1/x near 0 goes to both infinities and is never “large but connected”. The gap in the plot is the function telling the truth about its domain.
  • Typing implied multiplication the parser cannot see. 2x and 2(x+1) are understood, but a function name must touch its parenthesis (sin(x), not sin x), and function arguments need their parentheses; the error messages say where the reading failed.

Limitations

  • Functions of one variable x, graphed as y against f(x). Parametric curves, polar plots, implicit relations like x² + y² = 1 (a circle is not a function of x), and complex-number plots belong to different tools and are not approximated here.
  • The plot is a dense sample, not a proof: features narrower than the sample spacing (about a fortieth of the window width) can be missed or aliased, including very sharp spikes and closely spaced roots. Narrow the window to inspect a suspicious region.
  • Intercepts are found by sign change and bisection; tangent (even-multiplicity) roots that touch without crossing register only when sampled exactly, and the results say when none were found.
  • Inequality shading is drawn on a grid of cells, so the region’s edge is accurate to about one cell rather than to the curve itself.
  • Function values are floating point; displayed intercepts are rounded to six significant figures from values refined well past that.

Frequently asked questions

What expressions can I type?

Anything built from x, numbers, + − * / ^, parentheses, the constants pi and e, and the functions sin, cos, tan, asin, acos, atan, exp, ln, log, sqrt and abs, with implied multiplication like 2x or 3(x−1). The parser reads exactly that grammar and nothing else, which is what makes it safe: an expression is mathematics, never code.

Why does the curve have a gap where other calculators draw a line?

At a pole like x = 0 for 1/x the function has no value, and joining the two sides draws a segment that is not part of the graph. This plotter breaks the path instead. The same applies at domain edges: sqrt(x) simply begins at 0, with nothing drawn to its left.

How accurate are the intercepts?

They are found by bisection to roughly ten decimal digits and displayed at six significant figures, so the printed value is the accurate one to quote. The method’s blind spot is different: roots where the curve only touches the axis without crossing may not trigger the sign-change scan, as the method section states.

Can it graph a circle or an equation in x and y?

No. A circle fails the vertical-line test: it is not y as a function of x, and graphing it needs an implicit-plot tool that tests every cell against the full equation. This calculator is deliberately the function plotter of the family; the limitation is stated rather than faked with two half-graphs.

What do the dashed and solid boundaries mean?

The textbook convention: a strict inequality (< or >) excludes its boundary, drawn dashed; a non-strict one (≤ or ≥) includes it, drawn solid. The shading is the same either way; only the boundary’s status changes.

In what format is the download?

A PNG image rendered from the graph at twice its displayed size, with a white background, suitable for documents and slides. The graph itself is drawn as scalable vector shapes on the page, so the PNG stays crisp at that resolution.

Related calculators

Method: expressions are parsed into a tree (never evaluated as code) and sampled at 400 intervals across the chosen window; the path breaks at undefined points and at jumps larger than the window can honestly draw. Intercepts and intersections are sign-change roots refined by bisection to about 1e-10. Inequality regions are shaded by testing cell centres against every active inequality; strict boundaries are dashed. Values are floating point, displayed to six significant figures. Last reviewed: 21 October 2026.

Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice.