Calculus / Difference Quotient

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.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
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 \)
Formula (extracted text)
\( f'(x_1) = \lim_{x_2 \to x_1} \dfrac{f(x_2) - f(x_1)}{x_2 - x_1} \)
Variables and units
  • T = property tax (annual or monthly depending on input) (currency)
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 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.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
, ', svg: { fontCache: 'global' } }; ]], displayMath: [['\\[','\\]']] }, svg: { fontCache: 'global' } };, svg: { fontCache: 'global' } };