Secant Line Calculator
Find the secant line to a function between two x-values. Supports expressions with sin, cos, tan, exp, log, powers (use ^ or **), and constants like pi.
Calculator
Tip: use pi for π, e for Euler; sin(x), cos(x), log(x), sqrt(x) work.
Make sure x₁ ≠ x₂. If you want to approximate the tangent, choose x₂ very close to x₁.
Results
f(x₁)
—
f(x₂)
—
Secant slope m
—
Point-slope form
—
Slope-intercept form
—
Steps
—
What is a secant line?
A secant line to the graph of a function is a line that intersects the curve at two distinct points. If the points are \((x_1, f(x_1))\) and \((x_2, f(x_2))\), the secant line captures the average rate of change between those two x-values.
Formula for the secant line
Slope: \( m = \dfrac{f(x_2) - f(x_1)}{x_2 - x_1} \)
Point-slope: \( y - f(x_1) = m(x - x_1) \)
Slope-intercept: \( y = mx + b \) where \( b = f(x_1) - m x_1 \)
Secant vs tangent
If \( x_2 \to x_1 \), the secant line approaches the tangent line. This is exactly the idea behind the derivative:
\( f'(x_1) = \lim_{x_2 \to x_1} \dfrac{f(x_2) - f(x_1)}{x_2 - x_1} \)
FAQ
My function gives an error
Check for typos and that the function is defined at both x-values. Write sin(x) not sin x, and use * for multiplication.
Can I use degrees?
No, JavaScript’s Math functions use radians. Convert degrees to radians first if needed.
Formula (LaTeX) + variables + units
','\
Slope: \( m = \dfrac{f(x_2) - f(x_1)}{x_2 - x_1} \) Point-slope: \( y - f(x_1) = m(x - x_1) \) Slope-intercept: \( y = mx + b \) where \( b = f(x_1) - m x_1 \)
\( f'(x_1) = \lim_{x_2 \to x_1} \dfrac{f(x_2) - f(x_1)}{x_2 - x_1} \)
- T = property tax (annual or monthly depending on input) (currency)
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Last code update: 2026-01-19
- Initial audit spec draft generated from HTML extraction (review required).
- Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
- Confirm sources are authoritative and relevant to the calculator methodology.