About this tool
The Tangent & Normal Line Calculator is a free, in-browser tool that finds the straight line touching the curve y = f(x) at a chosen point x = a. The slope of that tangent is the derivative m = f′(a), and the line passes through the point (a, f(a)), giving the equation y = m(x − a) + f(a). The calculator differentiates numerically, so you can enter any function of x — polynomials, roots, trig, exponentials, logarithms — without working out the derivative by hand.
Everything is computed locally in your browser and nothing you type is sent anywhere. Enter the function using x as the variable (for example x^2, sin(x), or ln(x)) and the point of tangency a, and the tool reports the slope, the point (a, f(a)), and the tangent line in both slope-intercept form y = m·x + c and point-slope form. It also gives the normal line — the line through the same point but perpendicular to the tangent, with slope −1/m — handling the special cases where the tangent is horizontal (m = 0), in which the normal is the vertical line x = a.
The tangent line is the best straight-line approximation to a curve near a point, which is why it underlies linearization, Newton's method, and the very definition of the derivative. For y = x² at a = 2 the slope is f′(2) = 4 and the point is (2, 4), so the tangent is y = 4x − 4 and the normal is y = −0.25x + 4.5.