Excel Tutorial

Excel SEC Function



The Excel SEC function returns trigonometric secant of an angle (angle should be in radians).

The SEC function is a built-in function in Excel that is categorized as a Math/Trig Function. It can be used as a worksheet function in Excel. As a worksheet function, the SEC function can be used as part of a formula in a worksheet cell.

Syntax

SEC(number)

Parameters

number Required. Specify the angle in radian.

Return Value

Returns the trigonometric secant of an angle.

Notes

  • If the argument is in degrees, multiply it by PI()/180 or use the RADIANS function to convert it to radians.
  • SEC(n) equals 1/COS(n).
  • If the argument is a non-numeric value, SEC returns #VALUE! error.
  • If the argument is outside its constraints, SEC returns #NUM! error.

Example: Using as Worksheet Function

The example below shows how to use the SEC function as worksheet function.

Excel SEC function

Based on the Excel spreadsheet above, the output of the following worksheet formula will be:

=SEC(C5)
Result: 1

=SEC(C6)
Result: 1.414

=SEC(C7)
Result: 16324552277619100

=SEC(C8)
Result: -1.414

=SEC(C9)
Result: -1

=SEC(C10)
Result: -1.414

=SEC(C11)
Result: -5441517425873020

=SEC(C12)
Result: 1.414

=SEC(C13)
Result: 1

Example: Using angles in Degrees

To supply an angle to SEC function in degrees, the angle can be multiplied by PI()/180. Alternatively, the angle expressed in degrees can be used in the SEC function by converting it into radians using RADIANS function. For example, to get the SEC of 60 degrees, the following formula can be used:

=SEC(60 * PI()/180)
Result: 2

=SEC(RADIANS(60))
Result: 2

❮ Excel Functions