# Documentation/Calc Functions/SEC

From The Document Foundation Wiki

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

SEC

## Category:

Mathematical

## Summary:

Returns the secant of the given angle (in radians). The secant of an angle is equivalent to 1 divided by the cosine of that angle.

## Syntax:

SEC(**Number**)

## Returns:

Returns the (trigonometric) secant of **Number**, the angle in radians.

## Arguments:

**Number** is a real number or reference to the cell containing that number whose secant value is to be calculated.

If **Number** is a multiple of PI/2 or π/2, i.e. {......-3π/2,-π/2,0,+π/2,+3π/2.....}, the secant value is undefined, hence the function returns a numeric error(#NUM!) value.

## Additional details:

- The secant of an angle is equivalent to 1 divided by the cosine of that angle.
- To insert an angle in degrees, either multiply the angle by PI()/180 or use the RADIANS function to convert the angle to radians.
- The formula for the SEC function is:

Where N is the **Number**

The figure below illustrates the function SEC.

## Examples:

Formula | Description | Returns |
---|---|---|

=SEC(PI()/4) | secant or inverse cosine of PI/4 or π/4 radians | 1.4142135623731 |

=SEC(1) | secant or inverse cosine of 1 radian | 1.85081571768093 |

=SEC(RADIANS(60)) | secant of 60° by first converting angle in degrees to radians | 2 |

=SEC(PI()/2) | secant of PI/2 or π/2 radians | #NUM! |

## Related LibreOffice functions:

## ODF standard:

## Equivalent Excel functions:

SEC