Practice free

SEC function

SEC returns the secant of an angle given in radians, which is 1 divided by the cosine. Convert an angle in degrees with RADIANS first, because the function expects radians.

Example

Practice this in the app

Syntax

SEC(number)

number (required)
An angle in radians.

Returns: The secant (1 divided by the cosine).

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=SEC(0.5) 1.139493927 Positive
=SEC(0) 1 Zero
=SEC(-0.5) 1.139493927 Negative
=SEC(2) -2.402997962 Larger value
=SEC("0.5") 1.139493927 Text number "0.5"
=SEC(TRUE) 1.850815718 TRUE
=SEC("abc") #VALUE! Non-numeric text
=SEC(2^27+1) #NUM! Beyond 2^27

Where it works

Excel
SEC arrived in Excel 2013. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Math and trig functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .