Whatever message this page gives is out now! Go check it out!

Tan

Last update:
May 18, 2026

Description

Calculates the tangent of an angle that is entered in radians.

Returns

A number; the tangent of an angle.

Category

Function syntax

Tan(number)

See also

Atn Cos ACos Sin ASin Pi

Parameters

ParameterDescription
number
Angle, in radians, for which to calculate the tangent.

Usage

To convert degrees to radians, multiply degrees by p/180. To convert radians to degrees, multiply radians by 180/p.
Note: Because the function uses floating point arithmetic, it can return a small number (such as 6.12323399574E-017) for angles that must produce 0 and can return a large number (such as 1.63312393532E+016) for infinity or not a number. To test for a 0 value, check whether the value is less than 0.0000000000001. To test for an infinite value, check whether the value is more than 1E15.

Example

<cfscript>
    val=0.5
    writeOutput("The tan of " & val & " is: " & tan(val))
</cfscript>
Output
The tan of 0.5 is: 0.546302489844

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page