DATA - stays on your device
AI Assistant

Regression Calculator

Fit a best-fit line to your data and measure how strong the relationship is

Regression is one of the most widely used tools in statistics, science, and business. Given two variables — like hours studied and exam grade — regression finds the line (or curve) that best describes how one changes as the other changes.

This tool loads a sample dataset of 30 students with Hours studied, Grade earned, and Subject. Click Link Data to scatter-plot the data and fit a regression line. The slope, intercept, and R² (R-squared) — the fraction of variance explained by the model — are computed locally in your browser.

Paste your own two-column CSV any time to analyze your own data.

Graph

FAQ

What does R-squared mean?
ranges from 0 to 1. An R² of 0.85 means the regression line explains 85% of the variation in the outcome variable. R² = 1 is a perfect fit; R² = 0 means the line explains nothing.
What is linear regression?
Linear regression finds the line ŷ = mx + b that minimizes the sum of squared vertical distances from each data point to the line (least squares). The slope m tells you: for each 1-unit increase in x, y increases by m units on average.
When should I use quadratic or exponential regression?
Use quadratic regression when the scatter plot has a curved (U-shape or arch) pattern. Use exponential regression when the data grows or decays multiplicatively (e.g. population, compound interest). The AI will suggest the best model after viewing your data.
What does "color by group" do?
If your dataset has a categorical column (like Subject or Gender), you can color points by group to see whether the relationship differs across groups. Ask the AI: "color by Subject" and it will shade each group differently on the scatter plot.