Cosine Calculator

Compute the cosine of any angle, visualize the trigonometric ratio on the unit circle, and explore key properties of the cosine function.

Tip: After entering an angle, you can press the Enter key to calculate.
30°
45°
60°
90°
120°
180°
270°
360°
π/2 rad
π rad
Enter any real number. Cosine is periodic and even: cos(-θ) = cos(θ).
Privacy-first: All calculations are local. The unit circle is drawn in your browser — no data leaves your device.

Understanding Cosine: Definition, Properties & Applications

The cosine function (cos θ) is one of the fundamental trigonometric functions. In the context of the unit circle (a circle of radius 1 centered at the origin), cos θ corresponds to the x-coordinate of the point where the terminal ray of angle θ intersects the circle. This geometric interpretation provides an intuitive way to understand periodicity, evenness, and the relation to sine.

cos θ = adjacent / hypotenuse (right triangle definition)
On unit circle: cos θ = x-coordinate of point (cosθ, sinθ)

Euler's formula: cos θ = (e^{iθ} + e^{-iθ}) / 2

Key Cosine Properties

  • Even function: cos(−θ) = cos(θ)
  • Periodicity: cos(θ + 2π) = cos(θ) — fundamental period 2π (360°)
  • Range: cos θ ∈ [−1, 1] for all real θ
  • Zeros: cos θ = 0 at θ = π/2 + kπ (90° + 180°k)
  • Cosine Law: For any triangle with sides a,b,c and angle γ opposite c: c² = a² + b² − 2ab·cos γ

Why Use an Interactive Cosine Calculator?

Visualizing trigonometric functions on the unit circle deepens conceptual understanding. This tool goes beyond simple numeric output by showing the exact position of the terminal point, the horizontal projection (cosine), and the relationship to sine. Ideal for students learning trigonometry, engineers verifying calculations, or teachers preparing dynamic demonstrations.

Calculation Methodology

The calculator uses the built-in JavaScript Math.cos function which complies with IEEE 754 floating-point standard. When degrees are selected, the input is converted to radians (radians = degrees × π/180). The displayed values are accurate to 15 decimal places. The unit circle visualization is rendered with HTML5 Canvas, dynamically adjusting to any angle.

Numerical precision note: For angles where cosθ is extremely close to zero (absolute value less than 1×10⁻¹⁴), tanθ is displayed as positive or negative infinity (±∞), approximating the vertical asymptotes at π/2 and 3π/2. Due to the binary nature of floating‑point arithmetic, results for some exact angles (like 60°) may not be exactly 0.5 but a very close approximation (e.g., 0.49999999999999994). This is an inherent limitation of computer‑based calculation and is typically within 1×10⁻¹⁵ of the exact value.

Angle (degrees) Angle (radians) cos θ (exact) cos θ (decimal) Quadrant
0 1 1.0000 On positive x-axis
30° π/6 √3/2 0.8660 I
45° π/4 √2/2 0.7071 I
60° π/3 1/2 0.5000 I
90° π/2 0 0.0000 On positive y-axis
120° 2π/3 -1/2 -0.5000 II
180° π -1 -1.0000 On negative x-axis
270° 3π/2 0 0.0000 On negative y-axis
Real‑world Application: Alternating Current (AC) Circuits

In electrical engineering, voltage and current in AC circuits follow sinusoidal waveforms. For a purely resistive load, the instantaneous voltage V(t) = Vₚ·cos(ωt + φ), where the cosine term models the phase shift. Engineers use cosine values to compute power factors (cos φ) which measure efficiency. With this calculator, you can quickly evaluate cos φ for any phase angle — essential for power system design.

Derivation & Historical Context

The word "cosine" derives from the Latin sinus complementi (sine of the complement). Historically, cosine emerged as the sine of the complementary angle (90° − θ). Ancient Indian mathematicians (5th century) developed tables of sines, and later Islamic scholars introduced the cosine as "jiba tamam". In the 16th century, European mathematicians like Georg Joachim Rheticus popularized the modern notation. The unit circle representation was formalized by Leonhard Euler, who also connected cosine to complex exponentials, revolutionizing analysis. The term "co‑sine" literally means "complement's sine," highlighting its relationship with the sine function.

Step-by-Step: How to Use This Cosine Calculator

  1. Enter a numeric angle (positive or negative, integer or decimal).
  2. Select Degrees or Radians mode depending on your input.
  3. Click "Calculate & Visualize" or any preset example button.
  4. The result panel displays cos(θ), sin(θ), tan(θ), quadrant, and the exact angle conversion.
  5. The canvas draws the unit circle, the terminal point, and highlights the cosine segment (horizontal projection).

Advanced: Cosine Series Expansion & Numerical Computation

The cosine function can be expressed as a Maclaurin series: cos x = Σₙ₌₀^∞ (−1)ⁿ x²ⁿ/(2n)! = 1 − x²/2! + x⁴/4! − x⁶/6! + ... This infinite series converges for all real x and is used by computers for high-precision evaluation. Our calculator uses native processor instructions for speed and accuracy, but the underlying principle remains the same — ensuring reliable results for any scientific application.

Common Mistakes and Misconceptions

  • Confusing cosine with sine: Remember, cosine is the x‑coordinate (horizontal) on the unit circle, while sine is the y‑coordinate.
  • Degrees vs. radians: Forgetting to convert to radians when using computational tools leads to large errors. Our calculator automatically handles the conversion.
  • Even function property: cos(−θ) equals cos(θ), not −cos(θ). This symmetry is visible in the graph and unit circle.
  • Cosine of angles > 90°: Cosine becomes negative in quadrants II and III — a key observation from the unit circle visualization.
  • Expecting exact values for all angles: For most angles, the calculator returns a decimal approximation. For example, cos(45°) is approximately 0.7071, not exactly √2/2. Understanding the distinction between exact trigonometric values and their decimal approximations is crucial in fields requiring symbolic computation.
  • Floating-point precision artifacts: For certain exact angles (like 60°), the computer may return 0.49999999999999994 instead of 0.5 due to binary floating‑point representation limitations. This rounding error is typically below 1×10⁻¹⁵ and does not affect practical applications.

Frequently Asked Questions

Cosine always returns a value between -1 and 1 inclusive. This is because the x-coordinate of any point on the unit circle lies in that interval.

Use the arccos function on your calculator. This tool focuses on direct cosine calculation; for arccos we recommend our dedicated inverse trig tool (coming soon).

This derives from the equilateral triangle geometry. In a 30-60-90 triangle, the side adjacent to 60° is half the hypotenuse, giving ratio 1/2. However, due to floating-point representation, digital calculators may show 0.49999999999999994, which is the closest representable value to 0.5 in binary floating-point arithmetic.

Yes, cosine has a fundamental period of 360° (2π radians). cos(θ + 360°) = cos(θ) for any θ.

Absolutely. Because cosine is periodic, we reduce large angles modulo 360° (or 2π rad) internally. The result will be correct and between -1 and 1.

Trusted mathematical resource — This interactive cosine calculator was developed by the GetZenQuery Tech team. The content is peer‑reviewed and aligned with common core standards. The trigonometric concepts and methods presented are consistent with standard textbooks such as "Trigonometry" by Charles P. McKeague & Mark D. Turner. References: Abramowitz & Stegun, Handbook of Mathematical Functions; Wolfram MathWorld's Cosine entry; and classical trigonometry texts. Last updated April 2026 for accuracy and interactive improvements.

References: MathWorld: Cosine, Wikipedia: Trigonometric functions, NIST Digital Library of Mathematical Functions.