Angles turn up everywhere, from geometry homework to rotating a sprite in a game engine. Three units cover almost every case: degrees, radians and gradians. They all measure the same thing, a fraction of a full turn, just sliced differently. Knowing how to move between them avoids the classic bug where a function expects radians and you hand it degrees.
The three units
- Degrees — a full circle is 360°. The Babylonians chose 360 because it divides evenly by 2, 3, 4, 5, 6, 8, 9, 10 and 12, which made hand calculation painless.
- Radians — a full circle is 2π, roughly 6.283. One radian is the angle formed when the arc length equals the radius. This is the natural unit of calculus and of nearly every programming language.
- Gradians (also called gons) — a full circle is 400. Surveyors and some European engineering traditions prefer them because a right angle is a clean 100.
The degree to radian formula
To convert degrees to radians, multiply by π/180. To convert radians to degrees, multiply by 180/π.
radians = degrees × (π / 180)
So 90° becomes 90 × π/180 = π/2 ≈ 1.5708. Gradians are even simpler: 360° equals 400 grad, so degrees × (10/9) gives gradians and gradians × 0.9 gives degrees.
Why programmers use radians
The trigonometric functions in C, JavaScript, Python and most other languages take radians. Calling sin(90) expecting 1 instead returns about 0.894, because the input is read as 90 radians. Rotation, angular velocity and arc length also come out cleanly in radians: arc length is simply radius × angle, with no conversion constant in the way. Degrees are friendlier to humans; radians are friendlier to the math.
Common angle conversions
| Degrees | Radians | Gradians |
|---|---|---|
| 0° | 0 | 0 |
| 30° | π/6 ≈ 0.5236 | 33.33 |
| 45° | π/4 ≈ 0.7854 | 50 |
| 90° | π/2 ≈ 1.5708 | 100 |
| 180° | π ≈ 3.1416 | 200 |
| 360° | 2π ≈ 6.2832 | 400 |
Use the Angle Converter to translate any value instantly rather than remembering every factor.
Frequently asked questions
Which unit should I store in code? Store radians. Most math libraries expect them, and converting once at the input boundary is cleaner than converting at every call.
Are radians always written with π? No. π/2 is exact and readable, but numeric code usually needs the decimal value, about 1.5708 for that same angle.
When are gradians actually used? Mostly in land surveying and older European instruments, where the 400-grad circle and its 100-grad right angle simplify field calculations.