Least-Squares Linear Trendline (Slope & Intercept)

Fit an ordinary least squares (OLS) straight line y = mx + b to (x, y) data.

Runs locally in browser Free · No login Available (Noindex) · 2026-11-25 v4.0.0
Result
—
MetricValue

    Formula & Methodology

    m = Cov(x,y) / Var(x)

    Technical Explanation

    Fit an ordinary least squares (OLS) straight line y = mx + b to (x, y) data. Executes 100% locally in your browser with step-by-step derivations and CSV export.

    Worked Examples

    • Adjust inputs above to inspect live step-by-step output and download results as CSV.

    Limitations & Assumptions

    • Standard IEEE 754 double precision applies except modular exponentiation which uses arbitrary-precision BigInt.

    Source References & Verification

    Resource ID: calc-linear-trendline-slope · Technical check: 2026-11-25 (noindex pending/withheld from search)

    Related Resources