SEC function
The SEC function in Excel calculates the secant of a given angle, where the angle is specified in radians. The secant of an angle is the reciprocal of the cosine of that angle:
Syntax
=SEC(number)
Parameters
- number (required): The angle in radians for which you want the secant.
Key Points
- Angle in Radians: The input angle must be in radians. To convert degrees to radians, use the
RADIANSfunction:=SEC(RADIANS(degrees)) - Domain Restrictions: The
SECfunction is undefined for angles where
, such as
. For these values, the function returns a
#NUM!error. - Output: The result can be either positive or negative, depending on the angle.
Examples
- Calculate the secant of π/3:
=SEC(PI()/3)Result:
2 - Calculate the secant of 45 degrees:
=SEC(RADIANS(45))Result:
1.414213 - Calculate the secant of -π/4:
=SEC(-PI()/4)Result:
1.414213 - Calculate the secant for a value in cell A1:
=SEC(A1)
Errors
#NUM!: Occurs if the input results in an undefined secant (e.g., angles where
).
#VALUE!: Occurs if the input is not a valid numeric value.
Related Functions
COS: Calculates the cosine of an angle.SIN: Calculates the sine of an angle.COT: Calculates the cotangent of an angle.CSC: Calculates the cosecant of an angle.TAN: Calculates the tangent of an angle.
The SEC function is useful in trigonometry and applications involving periodic functions or waveforms.