tan

tan(x)

Try it yourself:

See also:

tan(): tangent of an angle

tan(x) returns the tangent of angle x, normally measured in radians. In a right triangle it is opposite side divided by adjacent side.

Examples and asymptotes

tan(0) is 0. Tangent becomes undefined at odd multiples of π/2, where cosine is zero, and values grow rapidly near those angles.

Related trigonometry

Use sin() and cos() for the component functions, atan() for the inverse, and pi for exact angle forms. atan2() finds an angle from coordinates.

Caveat

Convert degree inputs before calling tan, and avoid evaluating extremely close to an asymptote without a numerical plan.

Try Tan in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions