How to Calculate Slope in Excel
Generate a copyable Excel SLOPE formula for multiple points and a rise-over-run formula for exactly two points.
Written and checked by TheToolNet Editorial Team · Last reviewed: September 20, 2026 · Editorial method
Build an Excel slope formula
Use SLOPE for a best-fit line
=SLOPE(B2:B10,A2:A10) returns the slope of the linear regression through all paired observations. The y-range comes first. Both ranges must contain the same number of numeric points, and the x-values cannot all be identical.
Use rise over run for two points
For points in rows 2 and 3, use =(B3-B2)/(A3-A2). This exact two-point calculation is different from fitting many observations. Use the slope percentage calculator when you need angle and 1:N conversion too.