Math & Trig

SEC Function in Excel

Returns the secant of an angle in radians.

Syntax

  • =SEC(number)

Arguments

  • number (required): Angle in radians

Examples

  • =SEC(PI()/3) - Secant of 60 degrees - Result: 2

SEC in reporting workflows

  • Use absolute references when copying formulas across rows.
  • For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
  • Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.

Common errors

  • #DIV/0! when cosine is 0

Use cases

  • Trigonometry
  • Engineering
  • Physics

Frequently asked questions

  • What is the SEC function in Excel? SEC returns the secant of an angle in radians. The syntax is =SEC(number). Typical use cases include trigonometry, engineering, physics.
  • How do I use the SEC function? To use SEC, type =SEC( in a cell and provide the required arguments. Excel will show you the syntax and parameter hints as you type. Make sure to close the parentheses and press Enter to execute the function.
  • What happens if SEC encounters errors? If SEC encounters invalid arguments or calculation errors, it may return error values like #VALUE!, #NUM!, or #DIV/0!. Check your input values and ensure they meet the function's requirements.
  • Why is SEC not working in my Excel? Common issues with SEC include #DIV/0! when cosine is 0. Start by checking the syntax =SEC(number), then verify each referenced cell or range.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.