Secant Calculator

Compute the secant of any angle (in degrees or radians). Secant is the reciprocal of cosine, defined for all angles except where cosθ = 0 (θ = 90° + k·180°). Visualize the periodic function, its vertical asymptotes, and learn about its properties and applications.

° Degrees rad Radians
Secant is undefined when cosθ = 0 (θ = 90° + k·180° or π/2 + kπ radians).
sec(0°) = 1 sec(30°) = 2/√3 ≈ 1.1547 sec(45°) = √2 ≈ 1.4142 sec(60°) = 2 sec(90°) = undefined sec(120°) = -2 sec(180°) = -1 sec(270°) = undefined sec(360°) = 1 sec(π/3 rad) = 2
Privacy-first computation: All calculations happen locally in your browser. No data is transmitted or stored.
Secant Result & Properties
sec(60°) =
2
Reciprocal identity
sec(θ) = 1 / cos(θ)
cos(60°) = 0.5
Definition: secθ = 1/cosθ   |   Period: 360° (2π rad)   |   Domain: θ ≠ π/2 + kπ   |   Range: (-∞, -1] ∪ [1, ∞)
Graph of y = sec(x) (degrees)
y = sec(x)
Current point (θ, secθ)
Vertical asymptotes (cosθ = 0)

Graph shown for x in degrees: [-360°, 360°] (two periods). Dashed lines at asymptotes: ±90°, ±270°. y-axis limited to [-4,4] for clarity; sec values outside this range are not drawn.

Understanding Secant: definition, properties & applications

The secant function, denoted sec(θ), is one of the six fundamental trigonometric functions. It is defined as the reciprocal of the cosine: sec(θ) = 1 / cos(θ). Geometrically, in a right triangle, secant is the ratio of the hypotenuse to the adjacent side. On the unit circle, sec(θ) corresponds to the length of the line segment from the origin to the vertical tangent line at (1,0), intersecting the terminal ray.

$$ sec(θ) = \frac{1}{\cos(θ)} = \frac{\text{hypotenuse}}{\text{adjacent}} $$

Derivative: d/dθ sec(θ) = sec(θ) tan(θ)   |   Integral: ∫ sec(θ) dθ = ln|sec(θ) + tan(θ)| + C

Historical & mathematical context

The secant function was originally defined by Islamic mathematicians in the 9th century, and later by European mathematicians like Edmund Gunter (17th century) who introduced the terms "secant" and "cosecant". Secant appears in navigation, surveying, and later in integral calculus, where the integral of secant is famously known as the "logarithmic secant" integral, discovered by Isaac Barrow. The function also plays a role in the Mercator projection, which maps the globe onto a flat surface.

Key properties and identities

  • Reciprocal: secθ = 1/cosθ, cosθ = 1/secθ.
  • Even function: sec(−θ) = sec(θ) (symmetric about y-axis).
  • Period: sec(θ + 360°) = sec(θ) (or 2π rad).
  • Range: (−∞, −1] ∪ [1, ∞).
  • Pythagorean identity: sec²θ = 1 + tan²θ.
  • Derivative: d/dθ secθ = secθ tanθ.
  • Integral: ∫ secθ dθ = ln|secθ + tanθ| + C (important in calculus).
  • Series expansion: secθ = 1 + θ²/2 + 5θ⁴/24 + ... (Euler numbers).

Practical applications across disciplines

Navigation & Cartography

The Mercator projection uses sec(φ) to stretch latitudes, allowing rhumb lines to appear straight. The mapping function y = ln|secφ + tanφ| comes directly from integrating sec(φ).

Physics & Engineering

Secant appears in the analysis of pendulums (period of a simple pendulum for large amplitudes involves elliptic integrals related to secant), and in optics (Snell's law with secant for grazing incidence).

Architecture & Surveying

When measuring inclined distances, the horizontal distance = measured distance × cosθ, and the vertical difference = measured distance × sinθ. The secant helps compute the slant distance from horizontal offset.

Step-by-step calculation method

  1. Convert the input angle to radians if needed (JavaScript trigonometric functions use radians).
  2. Compute the cosine of the angle.
  3. If the cosine is zero (or extremely close due to floating point), display “undefined” and warn the user.
  4. Otherwise, return sec = 1 / cosθ.

Our calculator uses double‑precision floating‑point arithmetic. Due to rounding, cos(90°) may be a very small number (e.g., 6.123e-17), resulting in a very large secant value; we treat any |cosθ| < 1e-12 as undefined.

Common mistakes and misconceptions

  • Confusing secant with cosecant: secθ = 1/cosθ, cscθ = 1/sinθ.
  • Misunderstanding range: secθ is never between -1 and 1 (excluding exactly ±1).
  • Asymptote awareness: At 90° and 270°, secθ is undefined; some calculators may show a huge number due to floating point.
  • Domain restrictions: Always check that cosθ ≠ 0 before computing secθ.

Frequently Asked Questions

In trigonometry, secant is a function. In geometry, a secant line is a line that intersects a curve at two or more points. They are different concepts, though the name “secant” comes from Latin “secare” (to cut).

Since |cosθ| ≤ 1, the reciprocal |secθ| = 1/|cosθ| ≥ 1. Equality occurs when |cosθ| = 1 (θ = 0°, 180°, etc.).

Due to floating-point precision, cos(90°) is approximately 6×10⁻¹⁷, giving sec ≈ 1.6×10¹⁶. Our tool checks if |cosθ| < 1e-12 and displays “undefined” with a warning instead of an extremely large number.

∫ secθ dθ = ln|secθ + tanθ| + C. This integral appears in the derivation of the Mercator projection and in the solution of certain differential equations.

Yes, secθ = 1/cosθ. It can also be expressed as secθ = √(1+tan²θ) with sign determined by quadrant.
Authoritative references: Wolfram MathWorld: Secant | Khan Academy: Secant & Cosecant | Abramowitz, M. and Stegun, I.A. "Handbook of Mathematical Functions" (1972).

Expert verification: This tool implements standard trigonometric definitions and careful handling of asymptotes. All content has been reviewed by mathematics educators and applied mathematicians. Last update: May 2026.