Function Grapher
Plot y equals f of x from a typed expression, with automatic axis scaling and a live readout.
Runs in your browserInput
Examples: sin(x), 1/x, x^2 - 3x + 1, exp(-x^2), tan(x). A single letter before a bracket means multiplication.
View
Preview
Move the pointer across the plot to read coordinates at that x.
Good to know
- Trigonometric functions take radians, so a full period of sin(x) is about 6.28 wide.
- The curve is cut wherever the value stops being finite or leaves the visible range, so asymptotes are not joined by a false vertical line.
- Powers are right-associative: 2^3^2 means 2 to the power of 3 squared, which is 512. The value jumps you see near an asymptote are a sampling artefact, not the function.
About this tool
Type a function and see its curve, with the axes scaled to fit and a readout that follows your cursor. The parser accepts what you would write by hand — brackets, powers, the usual functions, and implicit multiplication such as 2x or 3(x+1). Where a function blows up, the curve stops rather than drawing a false vertical line, which is the mistake that makes most quick graph tools useless for anything with an asymptote.
How to use it
- 1Type the function, for example sin(x) or 1/x or x^2 - 3x + 1.
- 2Set the horizontal range, or leave the vertical range on automatic and let it fit the curve.
- 3Move the cursor across the plot to read the value of the function at that point.
Frequently asked questions
Why does the curve break instead of continuing through a jump?
Because it should. At an asymptote like the one in tan(x) or 1/x, the function goes to positive infinity on one side and negative infinity on the other. A tool that connects those points anyway draws a steep line that looks like part of the graph but is not — it is an artefact. Here the curve is cut wherever the value stops being finite or leaves the visible range.
The vertical axis looks wrong for my function. Why?
Automatic scaling uses the second and ninety-eighth percentiles of the sampled values rather than the absolute minimum and maximum. A single spike, which is exactly what 1/x produces near zero, would otherwise compress everything else into a flat line. If you would rather see the spike, turn automatic scaling off and set the range yourself.
Which functions and constants can I use?
sqrt, cbrt, abs, exp, ln, log, log2, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, round, floor, ceil, sign, min, max, pow and hypot, plus the constants pi, e and tau. Trigonometric functions take radians. A single letter followed by a bracket means multiplication, so x(x+1) works as expected.