Mathematics· Exact, step by step
Fit a straight line of best fit to your data and get the slope, intercept, correlation and R².
Formula
b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)²; a = ȳ − b·x̄; r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² · Σ(y − ȳ)²)
Worked example
x = 1–6, y = 2.1, 3.9, 6.2, 7.8, 10.1, 12.2: y = 2.02x − 0.02, R² = 0.9982.
Free to use with a link back. Nothing you type is shared.
Preparing citation…
Keep exploring
Find the slope, y-intercept, angle and equation of the line through two points.
Open calculatorPaste a list of numbers to get the mean, median, mode, range and standard deviation together.
Open calculatorFind the probability of a value below, above, between or outside limits on a normal distribution, with z-scores.
Open calculator