# What is the slope of a horizontal tangent line?

To calculate the slope of a straight line, we take a difference in the $y$ dimension and divide it by the change in the $x$ dimension of two points on the line:
$\text{slope} = \frac{{y}_{1} - {y}_{2}}{{x}_{1} - {x}_{2}}$ assuming points $\left({x}_{1} , {y}_{1}\right)$ and $\left({x}_{2} , {y}_{2}\right)$ lie on the line
For a horizontal line ${y}_{1} - {y}_{2} = 0$ so
$\text{slope} = \frac{0}{{x}_{1} - {x}_{2}} = 0$