Cos Calculator
Calculate cos(θ) in degrees or radians. Fast local calculation with shareable, machine-readable results.
Enter values to calculate.
Live graph
Interactive plot
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance
- Input interpretation
- Enter values to calculate.
- Result
- —
- Assurance
- Core
- Declared partition coverage
- PASS · 3/3 declared partitions (cos, invalid-domain, xcal) · Matrix
- Numerical scope
- ≤2 ULP vs O3 applies to the 18 published tabulated vectors (common angles 0°…180° plus 8 seeded random angles in (−50°, 50°)). It is not a guarantee over the entire real line, including huge angles or unlisted neighborhoods of zeros.
- Known limitations
- deg|rad; textbook snap
- Core CVP does not include live graph, viewport, or pointer interaction.
- Model
- The real cosine y = cos(θ) for an angle in degrees or radians. Default unit is degrees.
- Scope
- Real cosine. The published engine is forward cos(θ). Adjacent/hypotenuse is a local triangle convenience (hypotenuse > 0, adjacent ≥ 0, adjacent ≤ hypotenuse). Use Arccos for the inverse API.
- Verification
- Engine tested · Source checked · v1.0.5 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· View Manifest · CVP overview · Specification
- Versions
- Calculation 1.0.5 · CVP protocol 1.0.0-proposed · Evidence 2026-09-08.xcal
- Verification revision
- 2026-09-08.xcal · 3/3 property · digest ece0bdda8ca9
- Legacy regression
- 6/6 tests · Production surface contract 3/3
- Reference
- O1 model · O3 expected_values · O3 numerical_behavior · O2 expected_values · O2 numerical_behavior
- Interfaces
- PASS · UI (SSR) / REST / MCP / URL→result→graph
- Supplemental domain review
- Not performed
- Named expert review
- Not performed
- CVP suite
- 4/4 golden · 2/2 CVP boundary · 2/2 invalid · 3/3 property · 3/3 metamorphic · 4/4 round-trip · 18/18 O3 · 1/1 cross-interface · 8/8 cross-calculator · 4/4 URL→result→graph · 1/1 CVP contract · Manifest
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4
- NIST DLMF §4.14
- CalculatorX mathematical conventions
- Evidence
- 4 legacy golden · 2 legacy boundary · legacy regression suite · 4/4 oracle-backed golden · 2/2 invalid · Artifact integrity PASS
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Enter the angle θ
Angle mode takes θ in degrees or radians. Share URLs include theta and unit. An engine-linked Overview range slider on [−360°, 360°] (or [−2π, 2π]) writes θ through the same local engine. Domain remains all real θ.
Or use adjacent / hypotenuse
A local right-triangle convenience: hypotenuse > 0, adjacent ≥ 0, adjacent ≤ hypotenuse. Share URLs still use θ. Use Arccos for the published inverse.
Read cos(θ)
Exact labels appear only for listed identities (60°, 90°, …). The explainer reverse-checks with arccos of the principal value, even symmetry, or a 360° reduction — never arccos(y) ≈ θ when θ is outside [0°, 180°].
Example calculations
Common configurations with formula and result.
cos(60°)
Classic half
cos(0°)
Unit circle at (1, 0)
cos(90°)
Unit circle at (0, 1)
Adjacent / hypotenuse
cos = b/c
Cosine common values
Common values at a glance.
| θ (°) | θ (rad) | cos θ |
|---|---|---|
| 180° | π | −1 |
| 150° | 5π/6 | −√3/2 |
| 135° | 3π/4 | −√2/2 |
| 120° | 2π/3 | −1/2 |
| 90° | π/2 | 0 |
| 60° | π/3 | 1/2 |
| 45° | π/4 | √2/2 |
| 30° | π/6 | √3/2 |
| 0° | 0 | 1 |
Cos calculator specification
Version 1.0.5 · Engine tested
- Engine tested 6/6 tests · Production surface contract 3/3
- Named expert review Not performed
- Calculation version 1.0.5
- Definition
- Cosine of an angle θ is the ratio of the adjacent side to the hypotenuse in a right triangle, and the x-coordinate on the unit circle. Range is [−1, 1]. The function is even and 2π-periodic: cos(−θ) = cos(θ) and cos(θ + 360°) = cos(θ).
- What it calculates
- The real cosine y = cos(θ) for an angle in degrees or radians. Default unit is degrees.
- Inputs
- Angle θ (finite real)
- Optional unit: deg (default) or rad
- Outputs
- cos(θ) in [−1, 1]
- Formula
y = cos(θ_rad); θ_rad = θ° × π/180 when unit is deg- Assumptions
- Real cosine. The published engine is forward cos(θ). Adjacent/hypotenuse is a local triangle convenience (hypotenuse > 0, adjacent ≥ 0, adjacent ≤ hypotenuse). Use Arccos for the inverse API.
- Algebraic snap applies only when the reduced angle (mod 360°) is a listed identity such as 0°, 30°, 45°, 60°, 90°. Nearby floats, including 89.99999995°, keep IEEE-754 Math.cos.
- Units
- Dimensionless cosine value
- Degrees or radians for the angle
- Boundary conditions
- Missing θ returns MISSING_REQUIRED_INPUT. Invalid unit returns INVALID_UNIT. Malformed numbers, NaN, and ±Infinity return INVALID_NUMBER.
- cos(0°) = 1; cos(60°) = 1/2; cos(90°) = 0; cos(180°) = −1; cos(300°) = 1/2; cos(−θ) = cos(θ).
- Numerical precision
- IEEE-754 binary64 Math.cos after converting degrees with θ × π/180. That raw value is the published REST/SSR number unless θ reduces exactly to a listed identity.
- Listed identities (0°, 30°, 45°, 60°, 90°, … mod 360°) return the algebraic value (so exact 90° is 0, not ~6e-17). There is no 1e-7° proximity snap.
- Display may show ≈ 0 when |y| < 1e-12 and the input is not a listed identity. That rounding is UI-only and is not applied to the engine number.
- The Result Card shows the degree → radian conversion next to the value (θ° = θ×π/180 rad) before cos(θ_rad). Shared URLs and REST use the same conversion.
- The reverse check uses arccos principal value in [0°, 180°]. For negative θ it cites even symmetry; for |θ| ≥ 360° it cites 360° period; for θ in (180°, 360°) it shows the equivalent principal angle. It never writes arccos(y) ≈ θ when θ is outside [0°, 180°].
- Domain is all finite real θ. Extremely large finite angles can lose low-order phase bits in binary64 before 2π reduction; the engine still returns Math.cos of that converted argument and does not claim a unique mathematical angle.
- Interactive evaluation runs in the browser. Shared URLs and REST use the same engine server-side.
- The Result Card includes an engine-linked Live graph of y = cos(θ) using the same Overview / Focus template as Log (Overview window ±360° or ±2π; same degree/radian conversion as the engine). Angle mode has an engine-linked Overview range slider on [−360°, 360°] (or [−2π, 2π] in radians): dragging it writes θ and updates the result, reverse check, and graph through the same local engine. Adjacent/hypotenuse is a local triangle convenience: hypotenuse > 0, adjacent ≥ 0, adjacent ≤ hypotenuse.
- Example
- cos(60°) = 0.5; cos(π rad) = −1; cos(47.1°) ≈ 0.6807208689589178
- Validation cases
22 published on this page · 6/6 tests · Production surface contract 3/3 · View evidence
- theta=0, unit=deg → 1
- theta=30, unit=deg → √3/2
- theta=45, unit=deg → √2/2
- theta=60, unit=deg → 0.5
- theta=90, unit=deg → 0
- theta=-47.1, unit=deg → cos(47.1°) (even); IEEE-754, no snap
- theta=120, unit=deg → −0.5
- theta=180, unit=deg → −1
- theta=270, unit=deg → 0
- theta=300, unit=deg → 0.5 (principal arccos = 60°)
- theta=360, unit=deg → 1
- theta=720, unit=deg → 1
- theta=47.1, unit=deg → 0.6807208689589178 (IEEE-754)
- theta=π, unit=rad → −1
- theta=π/3, unit=rad → 0.5
- theta=89.99999995, unit=deg → IEEE-754 Math.cos (not snapped to 0)
- empty theta → error MISSING_REQUIRED_INPUT
- theta=60, unit=foo → error INVALID_UNIT
- theta=abc → error INVALID_NUMBER
- theta=NaN → error INVALID_NUMBER
- theta=Infinity → error INVALID_NUMBER
- theta=1e16, unit=deg → IEEE-754 Math.cos after θ×π/180; low-order phase may be lost
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4 — Elementary FunctionsSupports: Cosine as a standard trigonometric function with period 2π
- NIST DLMF §4.14 — Definitions and period of sine and cosineSupports: cos(θ) on the real line; even function; degree input converted via θ° × π/180
- CalculatorX mathematical conventions — Degree default; listed-identity exact values; inverse is ArccosSupports: Published engine is forward cos(θ) only. Algebraic snap is identity-only; |y|<1e-12 display rounding is UI-only.
- NIST Digital Library of Mathematical Functions, Chapter 4 — Elementary Functions
- Calculation version
- 1.0.5
Background
Interpretation and common distinctions.
What cosine is
Cosine is one of the six basic trigonometric functions. For a right triangle:
cos(θ) = adjacent/hypotenuse
On the unit circle, cos(θ) is the x-coordinate after rotating by θ from the positive x-axis.
The result always lies in [−1, 1].
Degrees or radians
| Unit | Typical use | Conversion |
|---|---|---|
| Degrees (°) | Geometry, surveying | θ(rad) = θ° × π/180 |
| Radians | Calculus, most code libraries | θ° = θ(rad) × 180/π |
This calculator evaluates cos in radians internally after converting degree input.
Periodicity and symmetry
cos(θ + 360°) = cos(θ), cos(θ + 2π) = cos(θ)
cos(−θ) = cos(θ)
(even function)
Inverse
To recover an angle from a cosine value, use Arccos (principal value in [0°, 180°]).
Graph sketch
y = cos(θ)
- Period 360°; even: cos(−θ)=cos(θ)
- At 0°, y=1; at 90°, y=0; at 180°, y=−1
CVP (Calculator Verification Protocol)
Math graph pilot under CVP 1.0 Proposed. Profile: core (pure cosine transform, not an engineering model).
- Evidence Manifest: /evidence/math.cos/1.0.5.cvp.json
- Reproduce: /evidence/math.cos/reproduce — tabulated O3 inputs, expected values, generator, and re-run commands
- Independent reference: O1 (NIST DLMF model) + O3 mpmath/MPFR expected values and numerical behavior + O2 live identities
- Numerical policy: IEEE-754 binary64; ≤2 ULP vs O3 applies to the 18 published tabulated vectors (common angles 0°…180° plus 8 seeded random angles in (−50°, 50°)). It is not a guarantee over the entire real line, including huge angles or unlisted neighborhoods of zeros.
declared_before_evaluation=true - Cross-calculator (
CVP-XCAL-01):sin²θ + cos²θ = 1vs published Sin;cos(arccos x) = xvs published Arccos for x ∈ (−1,1). Listed Tan / Arcsin do not share those identities (N/A). Huge angles are N/A after binary64 phase-bit loss. - Interfaces: UI (SSR), REST, and MCP must agree. A separate integration check covers URL → result → Live graph.
ui-ssris not a live browser session. - Versions stay distinct: calculation
1.0.5· CVP Proposed 1.0 · evidence revision2026-09-08.xcal. Adding verification does not by itself change the cosine algorithm. - Expert review is optional and is not required for CVP Verified.
Frequently asked questions
Key distinctions behind the calculation.
How do I find the cosine of an angle?
Enter the angle and select degrees or radians. The calculator converts to radians if needed and evaluates cos(θ).
Should I use degrees or radians?
Use whichever unit your problem states. The tool shows the equivalent in the other unit in the explainer.
Why is cos the same every 360°?
Cosine is periodic with period 360° (2π radians). Angles that differ by a full turn have the same cosine.
What is the range of cos?
Always between −1 and 1 inclusive.
What is cos(60°)?
Exactly 1/2 (0.5).
How do I go from cosine back to an angle?
Use the Arccos calculator for the principal value in [0°, 180°].