Skip to content

Graph plotter: functions, tangent, integral and regression

Type an expression and get a graph, a tangent at a point, a definite integral by Simpson’s rule, or a regression through your own points. The expression is never run as code, everything is calculated in your browser, and the graph downloads as SVG or PNG.

Opens without an account 3 times a day. A free account removes the limit.

What a graph plotter is and what this one draws

This free online tool from EduFacturing plots a graph from a typed expression and does calculations on it. There are four kinds: a function y=f(x), a parametric curve x(t), y(t), a polar curve r(θ), and a regression through typed points.

The expression is never run as code. A program written for this tool reads it, with a whitelist of 12 functions (sin, cos, tan, asin, acos, atan, exp, ln, log, log10, sqrt, abs) and the constants pi and e, and anything outside the list is refused with a message. Everything is calculated in the browser.

Graph plotter: the y=f(x) tab with the expression sin(x) from −10 to 10, example buttons, checkboxes for a tangent and an integral, and a sine wave with SVG and PNG buttons
Graph plotter: the y=f(x) tab with the expression sin(x) from −10 to 10, example buttons, checkboxes for a tangent and an integral, and a sine wave with SVG and PNG buttons

Plot a function, a polar curve or a regression: what it does

Plots a function, a curve and points

A function, a parametric curve, a polar curve, and points with a fitted line. There are 14 ready examples: 7, 3 and 4 for the first three kinds. Download as SVG or PNG (1280 × 800 px, white background).

Breaks the line at an asymptote

A jump of more than 3 window heights breaks the line, so tan(x) and 1/x show gaps instead of a vertical stroke across the graph.

Works out a tangent and an integral

At a point x₀ it shows f(x₀), the slope f′(x₀) and the tangent. Between a and b it shades the area and shows the integral. Both are for the y=f(x) tab only.

Fits a linear or polynomial regression

Enter x and y pairs, one per line, and choose a line or a polynomial of degree 2, 3 or 4. You get the equation, R² and a graph of the points with the fitted line.

When you need to graph a function, a curve or measurements

Use a graph to check a formula, teach a lesson or analyse measurements.

  • A graph of a function for a lesson

    A teacher plots a parabola or tan(x) and shows a tangent and a shaded area with the numbers next to them.

  • Linear regression for lab work

    A student enters measurements as x and y pairs and sees the line or polynomial through them, with its equation and R².

  • A graph for a drawing or a handout

    SVG is a vector for a drawing or a handout, PNG is a picture on a white background for a document.

  • Checking a curve

    A student checks a circle, a spiral, a three-petal rose, a cardioid or an astroid before using it in a document.

How an expression becomes a graph, a tangent and an integral

The expression is read, the tree is evaluated at sample points, and asymptotes are filtered out before plotting.

  1. Read the expression

    The program builds a tree and only that tree is evaluated. Unary minus ranks below exponentiation, so −2^2 is −4 and 2^3^2 is 2^(3^2) = 512.

  2. Sample

    The function is evaluated at 700 points (900 for a polar curve). For y=f(x) the automatic y-range is the 2nd and 98th percentile of 300 values plus a 15% margin.

  3. Filter

    For y=f(x), a point over 50 window heights from the centre is not drawn, and a jump over 3 heights breaks the line.

  4. Analyse

    The integral is Simpson’s rule at 1000 and at 2000 intervals, and it is refused if the two results differ by more than 10%.

The formulas the tool uses
Applies toFormulaMeaning
Tangentf′(x₀) ≈ (f(x₀ + h) − f(x₀ − h)) / (2h)h = max(10⁻⁶; |x₀|·10⁻⁶), a central difference
IntegralS = (h/3)·[f₀ + 4f₁ + 2f₂ + … + f_n]h = (b − a)/n, with n of 1000 and 2000; the value at 2000 is shown

Graph plotter from an equation: what is different

  • The expression is never run as code

    There is no eval or new Function: text such as fetch(…) is refused as an unknown function.

  • Spikes do not stretch the graph

    The automatic y-range uses percentiles: for tan(x) from −10 to 10 it is about ±19.

  • The integral checks itself

    With tan(x) from 0 to 2 the two grids disagree and the number is refused. With 1/x from −1 to 1 it is refused because x = 0 is a node.

What it does not do: one function at a time, 2x without *

One function is plotted at a time. The window is set with fields for y=f(x) and is automatic for parametric, polar and regression plots. The tangent and the integral are for y=f(x) only, and the derivative is a number at one point, not a curve.

Multiplication is written with *, and “2x” is not read. In an expression the decimal mark is a point; the range fields also accept a comma, while the points list takes only a point. The regression goes up to degree 4. The derivative and the integral are numerical approximations.

Questions about plotting a function, a tangent and a regression

How to graph a function?

In the y=f(x) tab type an expression like sin(x), set the range for x and download the graph as SVG or PNG (1280 × 800 px, white background).

How to graph polar equations?

In the Polar tab type r(theta), for example 1+cos(theta), and the range for θ. The window is automatic.

How to find the tangent line of a function?

In the y=f(x) tab switch on the tangent and set a point x₀: the tool shows f(x₀), the slope f′(x₀) and the tangent.

How to do a linear regression online?

In the Regression tab type one x,y pair per line, with a point as the decimal mark. With the five default points (1,2), (2,4), (3,5), (4,4), (5,5), the line is y = 0.6·x + 2.2 and R² = 0.6.

Why does tan(x) show gaps instead of a straight line?

Because a line drawn across the asymptote would join two points that the function never connects. A jump of more than 3 window heights breaks the curve there.

Do I need an account?

Without an account the tool opens 3 times a day. A free account removes the limit. Expressions and points are never sent anywhere.

The graph plotter is free. Pro opens the rest

Pro costs 15 EUR a month and opens 45 Pro tools.

In the Design group:

Plot your function

Opens without an account 3 times a day. A free account removes the limit.