A LITTLE CONTEXT
How to use linear regression calculator
- Enter or edit the example values in the input panel.
- Review the method below and choose the options that match your task.
- Run the tool, check the result, and copy or download it. Reset restores the example; Clear removes your input and result.
Method & assumptions
Ordinary least squares: slope b = Σ(dx·dy)/Σ(dx²); intercept a = ȳ−b·x̄; fitted y = a+b·x.
Fit one explanatory variable with an intercept by unweighted least squares. The result is a line description, not a causal model or a forecast guarantee. A constant Y series is allowed.
Result units: Slope and intercept (units follow the input data)
Worked example
- X observations
- 1, 2, 3
- Y observations
- 2, 4, 6
{
"slope": 2,
"intercept": 0,
"observations": 3
}