How to run a line of best fit on Desmos
Scatterplots, "models of best fit," and prediction questions all come down to one Desmos habit: drop the data in a table, then fit it with a single character — the tilde. Desmos does the regression; you read the equation.
Open a table and type your data into the x_1 and y_1 columns. Then on a new line, fit a model using ~ instead of =: y_1 ~ m x_1 + b for a line (Desmos returns m, b and r²), y_1 ~ a x_1^2 + b x_1 + c for a quadratic, or y_1 ~ a b^{x_1} for exponential growth. Use the fitted equation to predict a value at any new x. The closer r² is to 1, the tighter the fit.

~ means "best fit to my data," not "graph this equation."From a table to a prediction
Eight steps from a blank table to a forecasted value. The whole flow is type, tilde, read — and it works the same for lines, parabolas and exponentials.
Add a table
From the expression list, choose the option to add a table. Desmos creates two columns already labelled x_1 and y_1 — the subscript names matter for the next step.
Type the data in
Enter each x-value down the first column and its matching y-value beside it in the second. The points appear on the graph as you go, so you can eyeball the shape.
Decide the model
Look at the scatter. Roughly straight → a line. A single curve up or down → a quadratic. Steeply accelerating growth or decay → an exponential.
Fit with the tilde
On a new line type y_1 ~ m x_1 + b. The ~ (not =) is what triggers the regression. Use the same column names as your table.
Read the parameters
Desmos lists the fitted values — for a line, m (slope) and b (y-intercept). It also draws the fitted line right through your points.
Check r²
Find r^2 in the results. Close to 1 means the points hug the line; a lower value warns that this model type may be the wrong choice.
Predict a value
To forecast y at a new x, define f(x)=m x+b (the names m and b now hold the fitted numbers) and type f(12), or just substitute the x into the equation.
Swap models if needed
If r² is poor or the data clearly curves, change the fit line to y_1 ~ a x_1^2 + b x_1 + c or y_1 ~ a b^{x_1} and re-read the new parameters.
Fit a line, then predict
A typical SAT scatterplot question: a handful of points, a line of best fit, and a prediction at a value that isn't in the table.
A café records cups of cold brew sold against the day's high temperature (°F): (60, 18), (68, 27), (75, 33), (82, 41), and (90, 50). Using the line of best fit, predict the cups sold on a 78 °F day.
Build the table. Add a table and type the five temperatures down x_1 and the matching cup counts down y_1. The five points plot in a nearly straight, upward band.
Fit the line. On a new line type y_1 ~ m x_1 + b. Desmos returns roughly m ≈ 1.06 and b ≈ -45.3, with r² ≈ 0.998 — extremely close to 1, confirming a line is the right model.
Predict at x = 78. Define f(x)=m x+b and type f(78). Desmos returns about 36.96. Since the question asks for cups sold, you'd report roughly 37 cups — and the matching multiple-choice option is the nearest whole number.
Reading r² like a pro
An r² of 0.998 means the line explains about 99.8% of the variation in the data — the points sit almost exactly on it, so a linear model is safe and the prediction is trustworthy. If that number had come back low (say 0.55), it would be a signal to try a quadratic or exponential instead.
Avoid this slip: let Desmos keep the full-precision m and b. Rounding the slope and intercept by hand before predicting can push your answer past the nearest option — evaluate the function with the exact fitted values, then round only the final result.
When the tilde wins — and where it bites
Scatterplots and "model" questions.
Any time you're given paired data and asked for a slope, an intercept, a "line/model of best fit," or a prediction, a table plus one tilde line beats setting up the regression by hand or guessing from the graph.
Wrong model, wrong column names.
Fitting a line to clearly curved data gives a bad answer even though Desmos "works." And your fit line must reference the same names as the table (x_1, y_1) — a mismatched subscript means no fit appears.
When the equation is already given.
If the question states the line of best fit, you don't need to refit — just graph that equation or plug your x straight in. Reach for regression only when you must derive the model from data.
Practice fits on SAT-style data.
Regression setups stick only when you run them on real questions with the built-in calculator, until the tilde is second nature.
Desmos regressions on the SAT, answered
How do I do a line of best fit in Desmos on the SAT?
x_1 and y_1 columns. Then on a new line type y_1 ~ m x_1 + b using the tilde key. Desmos fits the line and shows the slope m, the intercept b, and r².What does the tilde (~) mean in Desmos?
y_1 ~ m x_1 + b means "find the m and b that best match the points in my table" — that is regression.How do I fit a quadratic or exponential model in Desmos?
y_1 ~ a x_1^2 + b x_1 + c for a quadratic or y_1 ~ a b^{x_1} for an exponential model. Desmos returns the fitted parameters and an r² for the fit. Choose the model that matches the shape of the plotted points.What is r² and what counts as a good fit?
r² measures how well the model explains the variation in the data, on a scale from 0 to 1. Values near 1 mean the points sit close to the fitted curve; lower values mean a looser fit. On the SAT it's mainly a check that your chosen model type is reasonable.Can I use the fitted equation to predict a value on the SAT?
More Desmos moves for SAT Math.
Turn scatterplots into easy points.
Start free and practice SAT-style data questions with the built-in calculator, until fitting a model and predicting is automatic.