Cosine Calculator Formula

Understand the math behind the cosine calculator. Each variable explained with a worked example.

Formulas Used

Cosine Val

cosine_val = cos(angle_deg * pi / 180)

Sine Val

sine_val = sin(angle_deg * pi / 180)

Tangent Val

tangent_val = tan(angle_deg * pi / 180)

Variables

VariableDescriptionDefault
angle_degAngle (degrees)(deg)60

How It Works

Cosine Function

Definition

In a right triangle, cos(angle) = adjacent / hypotenuse.

On the unit circle, cos(angle) is the x-coordinate of the point at that angle.

Key Values

Anglecos 0°1 30°√3/2 ≈ 0.8660 45°√2/2 ≈ 0.7071 60°0.5 90°0

Worked Example

Calculate cos(60°).

angle_deg = 60
  1. 01cos(60°) = 0.5
  2. 02sin(60°) = √3/2 ≈ 0.8660
  3. 03tan(60°) = √3 ≈ 1.7321

Frequently Asked Questions

What is the cosine function?

Cosine gives the ratio of the adjacent side to the hypotenuse in a right triangle, or the x-coordinate on the unit circle.

How are sine and cosine related?

sin²(x) + cos²(x) = 1 (Pythagorean identity). Also, cos(x) = sin(90° - x) and vice versa.

When is cosine zero?

Cosine equals zero at 90° and 270° (and every 180° offset from those).

Learn More

Guide

Trigonometry Basics - Complete Guide

Learn the fundamentals of trigonometry including sine, cosine, tangent, the unit circle, identities, and the laws of sines and cosines with practical examples.

Ready to run the numbers?

Open Cosine Calculator