2D Function Plotter – Graph Functions Online Free
Plot any mathematical function y = f(x) with our free online 2D function plotter. Visualize equations, explore graphs, and understand function behavior instantly.
Supports: +, -, *, /, ^ (power), sin, cos, tan, sqrt, log, ln, abs, exp, pi, e
Graph Any Mathematical Function in 2D
This 2D function plotter lets you visualize any mathematical function y = f(x) instantly. Type in your function, set the x and y range, and see the graph appear. No sign-up, no installation — it runs entirely in your browser.
How to Plot a Function
Enter your function in the f(x) field using standard math notation. The plotter understands powers (x^2, x^3), trig functions (sin, cos, tan), logarithms (log for base-10, ln for natural log), square roots (sqrt), and constants like pi and e.
Adjust the viewing window by setting X Min, X Max, Y Min, and Y Max. The default range of -10 to 10 works for many functions, but you will want to zoom in or out depending on what you are studying.
Click "Plot Function" and the graph appears below. The x-axis runs horizontally, the y-axis vertically. Where the curve crosses the x-axis, y = 0 — these are the roots or x-intercepts of your function.
Supported Functions and Syntax
Basic Operations
+Addition-Subtraction*Multiplication/Division^Power (x^2 means x²)
Trigonometric Functions
sin(x)Sine (x in radians)cos(x)Cosinetan(x)Tangent
Logarithmic & Exponential
log(x)Base-10 logarithmln(x)Natural logarithm (base e)exp(x)e^x
Other Functions
sqrt(x)Square rootabs(x)Absolute valuepiπ ≈ 3.14159eEuler's number ≈ 2.71828
Example Functions to Try
Quadratic: x^2
The classic parabola. Opens upward, vertex at origin. Try x^2 - 4 to see it shift down, or (x-2)^2 to shift right.
Cubic: x^3 - 3*x
An S-shaped curve with two turning points. This specific cubic has local max and min — good for studying calculus.
Sine Wave: sin(x)
The fundamental periodic function. Try 2*sin(x) for double amplitude, or sin(2*x) for double frequency.
Exponential: exp(x)
Rapid growth curve. Compare with exp(-x) for exponential decay. Both appear in physics and finance.
Square Root: sqrt(x)
Defined only for x ≥ 0. The curve starts at origin and grows slower as x increases.
Rational: 1/x
Hyperbola with two branches. Has vertical asymptote at x=0 and horizontal asymptote at y=0.
Understanding Function Graphs
A function graph shows the relationship between input (x) and output (y). Each point on the curve represents one input-output pair. If you pick any x-value and draw a vertical line, it hits the curve at exactly one point — that is what makes it a function.
The shape of the graph tells you about the function's behavior. Where the curve goes up as you move right, the function is increasing. Where it goes down, the function is decreasing. Flat spots (horizontal tangents) often mark maximum or minimum values.
Intercepts matter. The y-intercept (where x=0) shows the starting value. X-intercepts (where y=0) are the function's roots — solutions to f(x) = 0. These points have practical meaning in physics, economics, and engineering problems.
Quick Fact: The Language of Functions
The term "function" was coined by German mathematician Gottfried Wilhelm Leibniz in 1694, from the Latin "functio" meaning "performance" or "execution." Swiss mathematician Leonhard Euler introduced the notation f(x) in 1734, which we still use today. Euler also popularized using letters like f, g, h for functions and x, y, z for variables. Before this standardization, mathematicians described relationships in verbose prose — imagine writing "the square of the number" every time instead of just x².
Frequently Asked Questions
What types of functions can this plotter graph?
This tool handles most single-variable functions you encounter in high school and early college math: polynomials, rational functions, trigonometric functions, exponential and logarithmic functions, and combinations of these. It plots any function y = f(x) where f can be evaluated numerically.
Why does my graph look choppy or disconnected?
Some functions have discontinuities or vertical asymptotes (like 1/x at x=0). The plotter samples 200 points across your range — if the function shoots to infinity between samples, you will see gaps. Try narrowing the x-range around the problem area for a clearer view.
Can I plot multiple functions on the same graph?
This version plots one function at a time. To compare functions, plot the first one, note key points, then enter the second function. For serious multi-function work, tools like Desmos or GeoGebra offer that capability.
What should I do if the graph doesn't appear?
First, check that your function uses valid syntax — use * for multiplication (write 2*x, not 2x). Second, adjust your viewing window. If you plot x^2 with Y Max = 5, nothing shows because x^2 exceeds 5 for most x values. Try Y Max = 100 instead.
Does this work for parametric or polar equations?
No, this plotter only handles standard Cartesian functions y = f(x). Parametric equations (x(t), y(t)) and polar equations (r = f(θ)) require different plotting logic. Those are available in specialized graphing tools.
How accurate is the plotted curve?
The plotter evaluates your function at 200 evenly-spaced x-values and connects the points with straight lines. For smooth functions like polynomials, the result is visually indistinguishable from the true curve. For rapidly oscillating functions, increase detail by zooming in on a smaller range.
Can I use this on my phone or tablet?
Yes, the plotter runs in any modern browser on any device. The graph scales to fit your screen. Touch devices work fine — just tap the input fields and use the on-screen keyboard.
Other Free Tools
Coordinate Plane Plotter – Plot Points & Lines Online
Plot points, lines, and geometric shapes on an interactive coordinate plane with our free online plotter. Ideal for graphing equations, visualizing geometry, and teaching math.
Coordinate Geometry Calculator – Distance, Slope, Midpoint Online
Perform all coordinate geometry calculations with our free online calculator. Find distance, midpoint, slope, and line equations for any pair of coordinate points instantly.
Slope Calculator – Find the Slope of a Line Online
Calculate the slope or gradient of any line using two points or a linear equation with our free online slope calculator. Find slope, intercepts, and line equations easily.
Scatter Plot Generator – Create Scatter Plots Online Free
Generate scatter plots from any two-variable dataset with our free online scatter plot generator. Visualize data relationships, trends, and correlations instantly.
Derivative Calculator – Differentiate Functions Step by Step
Calculate the derivative of any function with our free online derivative calculator. Applies power, product, quotient, and chain rules with detailed step-by-step differentiation shown.
Definite Integral Calculator – Compute Integrals Numerically
Calculate definite integrals numerically with our free online integral calculator. Evaluate the area under any function curve over any interval with accurate numerical results.
Polynomial Evaluator – Calculate Polynomial Value at Any x
Evaluate any polynomial expression at a given value of x with our free online polynomial evaluator. Supports polynomials of any degree with instant accurate results.
Linear Regression Calculator – Find Best Fit Line Online
Perform linear regression analysis on any dataset with our free online linear regression calculator. Get the regression equation, slope, intercept, and R² value with a scatter plot.