Type a function and an x-value to get the equation of the tangent line in slope-intercept and point-slope form, plus the normal line, the derivative and the slope. The graph shows the curve, both lines and the point of tangency.
Last updated:
Examples:
Use x as the variable: ^ for powers, sqrt, cbrt, ln, log, e^x, sin, cos, tan, sec, asin, atan, abs, pi. Write 2x or 3sin(x) freely. The point can be an expression like pi/3 or 1/2.
Tangent liney = 9x − 15
f(x)TangentNormal
Drag to pan, scroll to zoom. Tick Equal scale to see the normal line at a true right angle.
Step-by-step
Linear approximation near the point
Close to x₀ the tangent line L(x) is a good stand-in for f(x). The error grows as you move away.
Advertisement
Advertisement
How to use the Tangent Line Calculator
Type the function f(x), for example x^3 - 3x + 1, sin(x) or sqrt(x).
Enter the x-value of the point of tangency. Expressions such as pi/6 or -1/2 are fine.
Press Calculate tangent line (or Enter). The tangent and normal equations appear with the slope and the point.
Check the graph: drag to pan, scroll or use + and − to zoom, and tick Equal scale for true right angles.
Read the steps and the linear approximation table, then copy the equations if you need them.
Tangent line formula
The tangent line to y = f(x) at x = x₀ touches the curve at (x₀, f(x₀)) and has the same slope as the curve there:
Slope: m = f′(x₀)
Point-slope form: y − f(x₀) = f′(x₀)(x − x₀)
Slope-intercept form: y = mx + b, where b = f(x₀) − m·x₀
Normal line: y − f(x₀) = −(1/m)(x − x₀), or x = x₀ when m = 0
Worked example
Find the tangent to f(x) = x³ − 3x + 1 at x = 2. First f(2) = 8 − 6 + 1 = 3, so the point is (2, 3). The derivative is f′(x) = 3x² − 3, so the slope is f′(2) = 12 − 3 = 9. Point-slope form: y − 3 = 9(x − 2). Expanding gives y = 9x − 15. The normal line has slope −1/9: y = −x/9 + 29/9.
Derivatives you will need most
f(x)
f′(x)
Example tangent
xⁿ
n·xⁿ⁻¹
x² at x = 3: y = 6x − 9
√x
1 / (2√x)
at x = 4: y = x/4 + 1
eˣ
eˣ
at x = 0: y = x + 1
ln x
1 / x
at x = 1: y = x − 1
sin x
cos x
at x = 0: y = x
cos x
−sin x
at x = 0: y = 1 (horizontal)
1 / x
−1 / x²
at x = 1: y = −x + 2
Tips
Trigonometric functions use radians, so the point π/4 should be typed as pi/4, not 45.
A horizontal tangent (slope 0) marks a stationary point: a local maximum, minimum or a flat inflection.
If you are given a slope instead of a point, set f′(x) equal to that slope, solve for x, then use this calculator at each solution.
For curves defined by an equation in x and y, such as a circle, use implicit differentiation to get the slope first.
Frequently asked questions
How do you find the equation of a tangent line?
Evaluate the function at the point to get y₀ = f(x₀), differentiate to get the slope m = f′(x₀), and plug both into the point-slope form y − y₀ = m(x − x₀). Rearranging gives y = mx + b with b = y₀ − m·x₀.
What is the normal line?
The normal line passes through the same point but is perpendicular to the tangent. Its slope is the negative reciprocal −1/m. If the tangent is horizontal (m = 0), the normal line is vertical, x = x₀.
What does the slope of the tangent line mean?
It is the instantaneous rate of change of the function at that point, which is exactly the derivative f′(x₀). A positive slope means the function is increasing there, a negative slope means it is decreasing, and zero marks a possible maximum or minimum.
When does a function have a vertical tangent?
When the graph is continuous but the derivative grows without bound at the point, such as f(x) = ∛x at x = 0. The tangent line is then x = x₀ and its slope is undefined. The calculator detects this case.
Why does it say there is no tangent line?
At a corner or cusp, like |x| at x = 0, the slopes from the left and right are different, so no single line touches the graph there. The function is not differentiable at that point, and the tool shows both one-sided slopes.
What is a linear approximation?
Near x₀ the tangent line L(x) = f(x₀) + f′(x₀)(x − x₀) is close to the curve, so it can estimate values. For example, the tangent to √x at x = 4 is L(x) = x/4 + 1, which gives √4.1 ≈ 2.025 (the true value is 2.0248…). The table shows how the error grows with distance.
Which functions can I enter?
Polynomials, fractions, powers and roots (sqrt, cbrt, x^(1/3)), exponentials (e^x, 2^x), logarithms (ln, log), trigonometric and inverse trigonometric functions, hyperbolic functions and abs. Angles are in radians.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.