Formualizer Docs

TAN

Returns the tangent of an angle in radians.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=TAN(number)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—

How it works

Tangent is sin(x) / cos(x) for a radian angle x. It is undefined at π/2 plus integer multiples of π.

Remarks

  • Input is interpreted as radians.
  • Near odd multiples of PI()/2, results can become very large.

Examples

Divide sine by cosine at half a radian.

Formula =TAN(0.5)

Expected result 0.54630248984379

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Negating the angle reverses the sign of the tangent.

Formula =TAN(-0.5)

Expected result -0.54630248984379

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A horizontal radius at zero radians has zero slope.

Formula =TAN(0)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The text “invalid” cannot be used as the input to the tangent.

Formula =TAN("invalid")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Tangent at PI/4

Formula =TAN(PI()/4)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why does TAN explode near PI()/2?

Because COS approaches zero there, TAN can become extremely large in magnitude.

Implementation

Engine source

On this page