All Tools
GRAPHING

Online 2D Graphing Calculator: Plot Functions, Derivatives & Tangents

An interactive 2D function plotter that graphs one or more y=f(x) expressions on a Cartesian plane. Overlay the numerical derivative as a dashed curve and draw a tangent line at any point, set the viewport manually or use standard/trigonometric/zoomed presets, and pan, zoom to the cursor or reset the view. Everything renders as crisp SVG and is calculated locally in your browser.

-10-8-6-4-20246810-5-4-3-2-1012345
sin(x)
~~
2D PLOT · GUIDE

2D Graphing Calculator Guide

Plot multiple functions, derivatives and tangent lines

The 2D graphing calculator plots one or more functions y = f(x) over a configurable window, with pan and zoom, optional numerical derivatives, and tangent lines. Add as many functions as you like, toggle their visibility, and overlay the derivative curve or a tangent at a chosen x value.

01 Plotting functions

Each row defines one function. Type an expression in x — such as sin(x), x^2 − 4, or 2*sin(x) + cos(2*x) — into the input; the graph updates automatically. Use the colour swatch to identify each curve. Check Visible to show/hide a curve without deleting it, Derivative to overlay f′(x), or Tangent to draw the tangent line at a specified x value (enter that x in the numeric field that appears). Click × to remove a function, or + Add function to add another.

The viewing window is set with xmin/xmax and ymin/ymax. Drag the canvas to pan and scroll/pinch to zoom. The preset buttons quickly reset to a standard range, configure a trig-friendly window, or zoom in. A legend identifies each plotted series.

  • Supported operators: +, −, *, /, ^ and parentheses
  • Functions: sin, cos, tan, asin, acos, atan, log, exp, sqrt, abs, min, max, pow, floor, ceil, round
  • Constant pi is available
  • An invalid expression shows an inline error on that function row
Buttons & Keys

Function rows

  • f(x) inputEnter an expression in x to plot (e.g. sin(x)).
  • VisibleShow or hide this curve without removing it.
  • DerivativeOverlay the numerical derivative f′(x).
  • TangentDraw the tangent line at a specific x value.
  • tangent at XSets the x value where the tangent line is drawn (shown when Tangent is on).
  • ×Removes the function row (disabled when only one remains).

Window and canvas

  • xmin / xmaxLeft and right bounds of the x-axis.
  • ymin / ymaxBottom and top bounds of the y-axis.
  • -10~10Reset to a standard −10 to 10 window.
  • trigSet a window suited to trigonometric functions.
  • zoomZoom in around the origin.
  • drag canvasPan the view by dragging.
  • scroll / pinchZoom in and out interactively.
  • reset viewOn-canvas button that restores the chart after panning or zooming with the mouse.

Adding functions

  • + Add functionAdds a new empty function row.
Tips
  • Use * for multiplication and ^ for powers — e.g. 2*x^2, not 2x².
  • Enable Derivative to visually inspect where slopes change sign (local extrema).
  • Zoom into crossing points to read roots more precisely.
  • Hide curves you are not using to keep the plot and legend readable.

A free online 2D graphing calculator. Plot multiple functions of x at once, pan and zoom with the mouse or wheel, overlay the numerical first derivative and a tangent line at any x, and use preset ranges. SVG rendering with automatic grid and tick marks. Everything runs locally in your browser — no sign-up.

Plotting functions

Enter each function as an expression of x, for example sin(x), x^2-4 or exp(-x/5)*cos(2*x). Add as many curves as you like, each in its own color, and toggle individual curves on and off. The axes, grid and tick marks rescale automatically as you pan and zoom.

Derivatives and tangent lines

Enable the derivative for any curve to overlay f′(x) as a dashed line, computed by numerical central differences rather than symbolic differentiation. Set an x value to draw the tangent line at that point and read off f(x) and f′(x).

Navigation and units

Drag to pan, scroll to zoom, and use the preset buttons (standard, trig, etc.) to reset to common ranges. The parser is a shunting-yard evaluator and treats x as radians — wrap degree inputs with pi/180, e.g. sin(30*pi/180).

FAQ

QHow many functions can I plot?
A

As many as you like — each function gets its own color and can be toggled on or off individually.

QHow are derivatives calculated?
A

By numerical central differences: f′(x) ≈ (f(x+h) − f(x−h)) / (2h) with an adaptive h, accurate to about 10 digits for smooth functions.

QDoes it use degrees or radians?
A

Radians, the calculus convention. For degree inputs wrap them with pi/180, e.g. sin(30*pi/180).

QDoes it require an internet connection?
A

No. Once the page loads, parsing and plotting run entirely in your browser; no function is sent anywhere.