The Excel SEC Function

Secant

The Secant is the reciprocal of the Cosine.

Therefore, for the right-angled triangle below, the secant of the angle θ is equal to the hypotenuse, h, divided by the adjacent side, a.

Right-Angled Triangle

I.e. for the triangle above,

Secant Equation
The trig. ratios are discussed further on the Wikipedia Trigonometric Ratios Page

Basic Description

The Excel Sec function calculates the secant of a given angle.

Note: the Sec function was only introduced in Excel 2013 and so is not available in earlier versions of Excel.

The syntax of the function is:

SEC( number )

Where the number argument is the angle (in radians) that you want to calculate the secant of. This must be between -2^27 and +2^27.

Converting from Degrees to Radians

If your angle is in degrees, you will need to convert it into radians before supplying it to the Sec function. This can be done using the Excel Radians function:

=RADIANS( degrees )
An example of this is given below.

Excel Sec Function Examples

In the following spreadsheet, the Excel Sec function is used to calculate the Secant of four different angles:

 Formulas:
 A
1=SEC( -3.14159265358979 )
2=SEC( 0 )
3=SEC( PI() / 4 )
4=SEC( RADIANS( 45 ) )
 Results:
 A
1-1
21
31.414213562
41.414213562

Note that, in the examples above:


Further details and examples of the Excel Sec function are provided on the Microsoft Office website.


Sec Function Errors

If you get an error from the Excel Sec function, this is likely to be one of the following:

Common Errors
#NUM!-Occurs if the supplied number is less than -2^27 or is greater than 2^27.
#VALUE!-Occurs if the supplied number is not recognised as a numeric value.