Graphing calculator

Plot several functions, polar curves and parametric curves; pan and zoom; find roots, intersections, turning points and areas.

Drafted with AI writing toolsUpdated Checked examples: 3

Functions

y = x^2 plots a function; r = 1 + cos(θ) a polar curve; (cos(t), sin(2t)) a parametric curve. Trig uses radians here.

Points of interest in view

Pointx ≈y ≈
Root−1.73205080
Root00
Root1.73205080
Maximum−12
Minimum1−2
Root−6.28318530
Root−3.14159270
Root3.14159270
Root6.28318530
Minimum−7.8539816−2
Maximum−4.7123892
Minimum−1.5707963−2
Maximum1.57079632
Minimum4.712389−2
Maximum7.85398162
Intersection−1.981305−1.8338359
Intersection00
Intersection1.9813051.8338359

Found by bisection on sign changes in double precision; shown to 8 significant figures.

About the graphing calculator

Plot up to six functions of x on one set of axes, alongside polar curves such as r = 1 + cos(θ) and parametric curves such as (cos(t), sin(2t)). Drag to pan, scroll or pinch to zoom, and hover to read each function's value, which is recomputed in 50-digit decimal at the pointer.

Below the plot, the calculator lists the roots, turning points and intersections visible in the current window, found by bisection on sign changes. It can also plot the derivative of the first function and shade the area under it between two limits, reporting the integral by Simpson's rule.

Trigonometric functions take radians here, as in most graphing software; type pi/2 rather than 90.

How to graph a function

Write the function in terms of x, such as y = x² − 4, typed as x^2 - 4. Its graph is every point (x, f(x)). This parabola crosses the x-axis at x = −2 and x = 2, where f(x) = 0, and its lowest point is the vertex (0, −4).

To sketch a graph by hand, or to check a plotted one, work out a few points and look for the features that matter: where the curve crosses the axes, where it turns, and where it is undefined.

Check a graph with a table of values

Substituting x values gives points the graph must pass through. For the parabola, f(−2) = (−2)² − 4 = 0. The cubic x³ − 3x is odd, so f(−x) = −f(x): its values at −1 and 1 are 2 and −2. The line 2x + 1 has slope 2 and crosses the y-axis at 1.

xx² − 4x³ − 3x2x + 1
-20-2-3
-1-32-1
0-401
1-3-23
2025

A table checks a few coordinates. It cannot show a narrow peak, closely spaced roots or a break that falls between the sampled points, so substitute a candidate back into the expression when an exact answer matters.

How to type functions

  • Powers and products: use ^ for powers and * for multiplication, as in x^3 - 3*x or x*sin(x). A number written directly before x, as in 2x, also multiplies.
  • Grouping: 1/(x-1) is one over x − 1, while 1/x-1 is one over x, minus one.
  • Angles: trigonometric functions take radians, so sin(pi/2) = 1 and sin(90) is the sine of 90 radians. For degrees, graph sin(pi*x/180), or use the scientific calculator in degree mode for single values.
  • Logarithms: log(x) is base 10 and ln(x) is base e. log2(x) gives base 2.
  • Polar and parametric curves: start with r = for a polar curve, as in r = 1 + cos(θ), or type a pair such as (cos(t), sin(t)).

Graphs of sin x, cos x and tan x

sin(x) and cos(x) are waves between −1 and 1 that repeat every 2π, about 6.2832. Sine starts at 0 and first peaks at x = π/2 ≈ 1.5708; cosine starts at its peak, 1, and is the same wave shifted left by π/2.

tan(x) = sin(x)/cos(x) repeats every π and is undefined wherever cos(x) = 0, at x = π/2 + kπ for any integer k. Near those vertical asymptotes the curve heads to +∞ on one side and −∞ on the other.

OpenStax's graphs of the other trigonometric functions explains tangent's period and asymptotes in detail.

Multiplying by x changes the shape. xsin(x) swings between the lines y = x and y = −x and no longer repeats, while xtan(x) keeps the asymptotes of tan(x). Both graphs are symmetric about the y-axis.

Graphs of ln x and log x

ln(x) and log(x) are defined only for x > 0, so both graphs lie to the right of the y-axis. Both pass through (1, 0), keep rising, and fall toward −∞ as x approaches 0. ln(x) reaches 1 at x = e ≈ 2.718, and log(x) reaches 1 at x = 10.

Because log(x) = ln(x)/ln 10, the base-10 curve is the natural-log curve squashed vertically by a factor of about 2.3026. OpenStax covers the shapes in graphs of logarithmic functions.

The products xln(x) and xlog(x) have the same domain, x > 0. They approach 0 as x approaches 0 but are not defined at 0 itself. x*ln(x) dips to its minimum, −1/e ≈ −0.3679, at x = 1/e.

A sine or cosine function with a given period

For sin(Bx) or cos(Bx) with x in radians, the period is 2π/|B|, so a period P needs B = 2π/P (OpenStax):

  • A sine function with period 2/3 is sin(3pix), because 2π/(3π) = 2/3.
  • A cosine function with period 7 is cos(2pix/7), because 2π/(2π/7) = 7.

Both have amplitude 1, no vertical shift and no phase shift. Changing any of those gives another function with the same period.

These values at x = 1 and x = 2, rounded to eight significant digits, check the curves above:

Expression to enterValue at x = 1Value at x = 2
x^2-4-30
x^3-3*x-22
2*x+135
sin(x)0.841470980.90929743
cos(x)0.54030231-0.41614684
tan(x)1.5574077-2.1850399
x*sin(x)0.841470981.8185949
x*tan(x)1.5574077-4.3700797
ln(x)00.69314718
log(x)00.30103000
x*ln(x)01.3862944
x*log(x)00.60205999
sin(3*pi*x)00
cos(2*pi*x/7)0.62348980-0.22252093

Roots and intersections

A root is where f(x) = 0, so the graph meets the x-axis. A root where the curve only touches the axis, as y = x² does at 0, has no sign change on either side and is easy to miss numerically; zoom in to confirm it.

Two graphs intersect where f(x) = g(x). The curves y = x² and y = 2x cross at (0, 0) and (2, 4), the solutions of x² − 2x = 0. A read-off coordinate is rounded, so substitute it back when precision matters.

For exact roots of a quadratic, use the quadratic equation solver; for lines, distances and midpoints, the coordinate geometry calculator.

Slopes and areas under a curve

The derivative is the slope of the graph: positive where the curve rises, zero at a turning point and negative where it falls. The area under a curve between two limits is the definite integral, which counts regions below the x-axis as negative.

For y = x² from 0 to 1 the area is exactly 1/3. Reversing the limits flips the sign, and a curve that breaks or is undefined inside the interval may have no finite area there.

Worked examples

Cubic at 2

f(x)
x^3 - 3x
x
2
f(x)
2

Checked against: 8 − 6

Sine at π/2

f(x)
sin(x)
x
pi/2
f(x)
1

Checked against: sin(π/2) = 1; the plotter works in radians

Rational function

f(x)
1/(x-1)
x
3
f(x)
0.5

Checked against: 1/2

Questions

How do I find where two graphs intersect?

Enter both functions and look at the 'Points of interest' table under the plot. It reports numerical candidates in the visible window, with coordinates rounded to 8 significant figures; this display precision does not guarantee that accuracy. Sampling can miss tangencies or closely spaced intersections. Zoom or pan to inspect the region, and check important solutions in the original equations.

Can it plot polar and parametric equations?

Yes. Start a line with r = to plot a polar curve in θ (for example r = 2 sin(3θ) draws a three-petal rose), or write a pair in brackets such as (cos(t), sin(t)) for a parametric curve, traced for t from −2π to 2π.

Why does tan(x) have gaps?

tan(x) has vertical asymptotes at x = π/2 + kπ, where it jumps from +∞ to −∞. The plotter breaks the line wherever consecutive samples jump by more than one and a half screen heights, so it doesn't draw false vertical lines across the asymptotes.

Sources

  1. OpenStax Precalculus 2e — Functions, function notation and graphs
  2. OpenStax Precalculus 2e — Graphs of the sine and cosine functions
  3. Implementation: adaptive sampling with discontinuity breaks; values at a point recomputed in 50-digit Decimal

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.