Plot a Function
Draw graphs of mathematical functions. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
Output
Generating…
This runs entirely on your device
Plot a Function is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. Nothing is requested from a server, so the result you see has never existed anywhere but here.
- No server involved
- Generated on your device
- Works offline once loaded
- Nothing stored or logged
How to use Plot a Function
- 1. Type the function and its range. Enter your expression in f(x), like sin(x) * x, then set x min and x max to define the horizontal range the graph will cover.
- 2. Adjust sampling and the grid. Set Samples to control how many points are plotted, higher for smoother curves near sharp features, and toggle Grid on to add reference gridlines behind the curve.
- 3. Style the canvas. Set Width and Height in pixels, then choose Line color, Background color, and Line width to match a slide, document, or presentation theme.
- 4. Review or export the graph. The SVG plot renders live as you edit the expression or range. Press Download PNG (or Download SVG, or Copy image) once the shape looks the way you want.
When to use Plot a Function
Plot a Function draws the graph of any expression in x over a chosen range, rendered as an SVG with optional gridlines. Use it to see a function's shape instantly instead of sketching it by hand or opening a full graphing application.
- Checking a calculus homework sketch. You sketched the shape of a function by hand to identify its local maxima and inflection points, and want to confirm your sketch against an accurate rendered graph before submitting the assignment.
- Exploring how parameters change a curve's shape. You are teaching a precalculus class about how coefficients affect a parabola or sine wave, and plotting several variations side by side makes the transformation visible instantly.
- Debugging a formula before coding it. Before implementing a physics or finance formula in code, plotting it over the expected input range confirms the shape looks reasonable and catches sign errors or asymptotes you missed.
- Producing a graph for a document or slide. You need a clean SVG graph of a specific function for a report or presentation, with a background color matching your slide deck, without opening a separate charting tool.
Examples
Plot f(x) = sin(x) · x from −10 to 10
Output
An SVG graph of the function with axes and a grid.
About the Plot a Function tool
Plot a Function is a free online tool that works entirely inside your web browser. Draw graphs of mathematical functions. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 234 Math utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
You can shape the output with 10 settings, including f(x), x min, x max and Samples, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every step is handled on your own machine rather than by a remote API.
Frequently asked questions
Is Plot a Function free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Does the generator send anything to a server?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How do I get a different result?
Change a setting. The result is worked out from the settings alone, so the same settings always give the same result, and a change shows up immediately.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
Can I save what the tool produces?
Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.