Function Sketch Finder
Draw the graph you have in mind — freehand strokes, exact points typed in as coordinates, straight segments, and arcs bent through a third click, with endpoints snapping to placed points — on a coordinate plane you can pan and zoom like a map. Press Find and the tool searches more than 30 function families: polynomials up to degree six, square and cube roots, logarithms, reciprocals, exponentials, power laws, sines and damped sines, Gaussian bells and Lorentzian peaks, logistic, Gompertz and hyperbolic-tangent S-curves, absolute values, hyperbolas, catenaries, sinc ripples and rational functions. Linear-in-parameter families are solved by weighted least squares and the rest by Levenberg–Marquardt from data-driven starting points. Candidates are ranked by a BIC-style score that trades closeness against parameter count — an adjustable simplicity bias keeps a wobbly sixth-degree polynomial from beating a clean sine — and each result lists its equation, R², RMSE and a thumbnail plot. Click a row to overlay the fitted function on your sketch.
Runs 100% in your browser — models are trained and computed locally on your device.
Read the full guide to this tool
Notes
- Every stroke is resampled into weighted data points: lines and arcs contribute evenly spaced samples, and deliberately placed points count four times as much as freehand samples.
- The ranking score is n·ln(MSE) + λ·k·ln(n) — the Bayesian information criterion with the simplicity slider scaling λ. A model with more parameters k must earn its keep with a genuinely smaller error.
- Nonlinear families depend on their starting guesses: frequencies for sines come from a grid over the sketch width, rates for exponentials from the data range, so a very unusual sketch can still settle in a local minimum — redrawing at a different scale often helps.
- Runs 100% in your browser — models are trained and computed locally on your device.