The SEC function returns the secant of an angle given in radians, calculated as 1 divided by the cosine of that angle. It is useful for trigonometric calculations in engineering, physics, and geometry.
=SEC(number)What does SEC do?
The SEC function in Excel calculates the secant of an angle. In trigonometry, the secant is the reciprocal of the cosine, so SEC(number) is equivalent to 1/COS(number). Excel works in radians, so you will usually convert degrees to radians using the RADIANS function before calling SEC.
While secant may seem like a niche function, it appears in many practical calculations: wave analysis, structural engineering, navigation, and any field that uses right-triangle relationships. Having SEC built into Excel means you can perform these calculations directly in your spreadsheets without manual reciprocal steps.
Imagine you are an engineer analysing the tension in a cable at various angles. You have a list of angles in degrees and need the secant of each to compute the force multiplier. With SEC and RADIANS, you can fill a column in seconds and avoid errors from manual division.
When to use SEC
- Calculating force multipliers in physics or engineering problems involving angles.
- Analysing alternating current circuits where secant relates to impedance.
- Solving right-triangle problems in surveying or construction.
- Converting angular data in navigation or astronomy.
- Teaching or learning trigonometry with instant spreadsheet feedback.
SEC syntax
=SEC(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The angle in radians for which you want the secant. If you have degrees, wrap the value in RADIANS, e.g., RADIANS(60). |
What it returns: The secant of the given angle as a numeric value. If the angle is an odd multiple of π/2, the cosine is zero and SEC returns a very large number (approximately 1.633e16) or an error in some contexts.
SEC examples
1 Basic secant of a single angle in radians
This example shows the simplest use: finding the secant of an angle already in radians. The formula =SEC(B2) takes the value in cell B2 (0.5236 radians, about 30 degrees) and returns its secant. The result is approximately 1.1547, which is 1 divided by the cosine of 0.5236.
| A | B | C | |
|---|---|---|---|
| 1 | Angle (rad) | Secant | |
| 2 | 0.5236 | 1.154701355 | |
| 3 |
2 Secant of angles given in degrees
Often angles are stored in degrees. The formula =SEC(RADIANS(A2)) converts the degree value in A2 to radians and then computes the secant. For 45 degrees, the secant is about 1.4142. This approach avoids manual conversion and keeps the sheet readable.
| A | B | C | |
|---|---|---|---|
| 1 | Angle (deg) | Secant | |
| 2 | 45 | 1.414213562 | |
| 3 |
3 Secant for a list of angles in a table
Here we have a small table of angles in degrees and want the secant for each. The formula =SEC(RADIANS(A2)) is entered in B2 and can be filled down. Each row converts its angle to radians and returns the secant. This is efficient for batch calculations.
| A | B | C | |
|---|---|---|---|
| 1 | Angle (deg) | Secant | |
| 2 | 0 | 1 | |
| 3 | 30 | ||
| 4 | 60 | ||
| 5 |
4 Using SEC to calculate a force multiplier
In a physics scenario, the force multiplier for a cable at an angle is the secant of that angle. The table lists angles in degrees and the formula =SEC(RADIANS(A2)) computes the multiplier. For 60 degrees, the multiplier is 2, meaning the tension is twice the load.
| A | B | C | |
|---|---|---|---|
| 1 | Angle (deg) | Force Multiplier | |
| 2 | 60 | 2 | |
| 3 |
5 Secant in a right-triangle context
In a right triangle, secant of an angle equals hypotenuse divided by adjacent side. The table gives the angle and the adjacent side length; the formula =SEC(RADIANS(A2))*B2 calculates the hypotenuse. For a 30-degree angle and adjacent side 10, the hypotenuse is about 11.547.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Angle (deg) | Adjacent | Hypotenuse | |
| 2 | 30 | 10 | 11.54700538 | |
| 3 |
Common SEC errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The argument is non-numeric, such as text or a blank cell that is not a number. | Ensure the argument is a number or a reference to a cell containing a number. Use ISNUMBER to check. |
| #DIV/0! | The angle is an odd multiple of π/2 (90°, 270°, etc.), making the cosine zero. | Avoid exact odd multiples of π/2 or handle them with IF and a tolerance, e.g., IF(ABS(COS(angle))<1E-10, "Undefined", SEC(angle)). |
| #NUM! | The result is too large to be represented, which can happen for angles very close to odd multiples of π/2. | Check the angle value; if it is extremely close to 90° + k*180°, consider whether the secant is meaningful or use a limit approach. |
Tips for using SEC
- Always convert degrees to radians with RADIANS before using SEC, unless your data is already in radians.
- Use the formula =1/COS(angle) as an alternative if you need to support older Excel versions that lack SEC.
- Remember that secant is undefined at 90°, 270°, etc.; use IF to flag these cases in your sheet.
- Combine SEC with ROUND to present clean results, e.g., =ROUND(SEC(RADIANS(A2)),4).
- When filling formulas down, use absolute references if you need to refer to a fixed angle cell.
Frequently asked questions
What is the difference between SEC and COS?
SEC returns the secant, which is 1 divided by the cosine. COS returns the cosine directly. Use SEC when you need the reciprocal of cosine.
Can SEC accept degrees directly?
No, SEC expects radians. Convert degrees to radians using the RADIANS function, e.g., =SEC(RADIANS(60)).
Why does SEC return a huge number for 90 degrees?
At 90 degrees, cosine is zero, so secant is mathematically undefined. Excel returns a very large number due to floating-point precision instead of an error.
Is SEC available in all Excel versions?
SEC was introduced in Excel 2013. In older versions, use =1/COS(number) instead.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. SEC reference