Skip to main content
ilovecalcs logoilovecalcs.

Math · Live

Graphing Calculator, plot any function instantly.

Enter any mathematical function and see it plotted in real-time. Supports polynomials, trigonometry, exponentials, logarithms, and more — up to three equations simultaneously. Fully client-side, no sign-up required.

Math syntaxLive plot

Equations

Function plotter

f(x)=

X Range

Y Range

Auto

Quick presets

Syntax tips

x^2power
2*xmultiply
sin(x)sine
sqrt(x)square root
abs(x)absolute
log(x)natural log
piπ ≈ 3.14159
ee ≈ 2.71828
f1(x) = x^2 - 4

f1(x) = x^2 - 4

X-intercepts (zeros)
-2.000, 2.000
Y-intercept (x = 0)
-4.000
Domain (plotted)
[-10.00, 10.00]
Range (approx.)
[-15.57, 104.44]

Math syntax guide

How to use the graphing calculator and write mathematical expressions

Writing expressions: the basics

This calculator uses standard mathematical notation with a few conventions inherited from programming languages. The most important rule: multiplication must be written explicitly with the * operator. Writing 2x is not valid — you must write 2*x.

Exponentiation uses the caret symbol ^. So x^2 means x squared, x^3 means x cubed, and 2^x means 2 raised to the power of x.

Parentheses work exactly as in standard math: (x + 1) * (x - 3) evaluates the additions first, then multiplies. You can nest parentheses as deeply as needed.

Supported functions

The calculator uses the mathjs library under the hood, which provides a comprehensive set of built-in mathematical functions:

  • Trigonometric: sin(x), cos(x), tan(x), asin(x), acos(x), atan(x) — angles in radians.
  • Hyperbolic: sinh(x), cosh(x), tanh(x).
  • Exponential & logarithmic: exp(x) for eˣ, log(x) for the natural logarithm (ln), log(x, 10) for log base 10, log2(x) for log base 2.
  • Power & roots: sqrt(x) for √x, cbrt(x) for ∛x, x^n for any power.
  • Miscellaneous: abs(x) for |x|, floor(x), ceil(x), round(x), sign(x).

Built-in constants

Two mathematical constants are built-in and can be used anywhere in your expressions:

  • pi — the ratio of a circle's circumference to its diameter, approximately 3.14159265…
  • e — Euler's number, the base of the natural logarithm, approximately 2.71828182…

For example, sin(2*pi*x) plots a sine wave with period 1, and e^x plots the natural exponential function (equivalent to writing exp(x)).

Understanding the plot output

The graph plots the function over the specified X range with 500 evenly spaced sample points. Points where the function is undefined or tends to infinity (such as near x = 0 for 1/x, or negative values for sqrt(x)) are shown as gaps in the line — the curve simply breaks rather than drawing a misleading spike.

The Y axis autoscales to the 2nd–98th percentile of computed values, which prevents a single near-asymptote from collapsing the rest of the graph into a flat line. Toggle off "Y Range Auto" if you want to set exact bounds.

The analysis panel below the chart automatically computes:

  • X-intercepts (zeros): approximate values of x where f(x) = 0, found via sign-change detection.
  • Y-intercept: the value of f(0), if it exists.
  • Domain and range: the plotted x range and the approximate y range of the function within that domain.

Plotting multiple functions

Up to three functions can be plotted simultaneously using the "Add equation" button. Each function is drawn in a different color — amber, sky blue, and red — so you can visually compare their shapes, intercepts, and intersections.

Use multiple equations to explore relationships: plot x^2 and 2*x + 3 simultaneously to find their intersection points visually, or compare sin(x) and cos(x) to see the phase difference.

Common expression examples

Here are some interesting equations to try:

  • x^3 - 3*x — a cubic with two local extrema.
  • sin(x) / x — the sinc function (note the gap at x = 0 since division by zero is undefined).
  • e^(-x^2) — a Gaussian bell curve.
  • floor(x) — a step function (staircase shape).
  • abs(sin(x)) — sine wave with all values reflected above the x-axis.
  • log(abs(x)) — natural log of |x|, defined for all x ≠ 0.