How can I convert from degrees to radians?
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
Converting angles from degrees to radians is a common task in various fields such as mathematics, physics, engineering, and computer graphics. This article will guide you through the process, providing technical explanations and examples to enhance understanding.
Understanding Degrees and Radians
Before delving into the conversion process, it's essential to understand what degrees and radians are:
• Degrees: This is a unit of measurement for angles. A full circle is 360 degrees. This unit is often used in day-to-day life and is common in fields like geography and navigation.
• Radians: This is another unit of measurement for angles, preferred in mathematical and scientific calculations due to its natural relationship with the properties of circles. A full circle is radians.
Relationship Between Degrees and Radians
The key to converting between degrees and radians lies in the relationship that a full circle is 360 degrees, which is equivalent to radians. This relationship provides the conversion factor between the two units.
Formula for Conversion
To convert from degrees to radians, you can use the following formula:
This formula comes from the relationship that 180 degrees equals radians. Therefore, to convert an angle in degrees to radians, you multiply by the ratio of to 180.
Example: Converting Degrees to Radians
Consider an angle of 90 degrees and converting it to radians:
Thus, 90 degrees is equivalent to radians.
Why Convert to Radians?
The choice of radians over degrees, especially in higher mathematics and applied sciences, is not arbitrary. Here are some reasons for the preference:
- Mathematical Elegance: Calculations involving trigonometric functions, derivatives, and integrals often result in more concise and simple expressions when angles are in radians.
- Natural Relation to Circles: Since the circumference of a circle is times the radius, radians provide a natural notation for angle measurements.
- Dimensional Consistency: When using calculus, constants and formulas often simplify because radians are a dimensionless unit, enhancing precision and reducing errors.
Conversion Table
Below is a table summarizing the conversion of some common angles from degrees to radians:
| Degrees | Radians | in Radians |
| 30 | 0.5236 | |
| 45 | 0.7854 | |
| 60 | 1.0472 | |
| 90 | 1.5708 | |
| 180 | 3.1416 | |
| 270 | 4.7124 | |
| 360 | 6.2832 |
Additional Subtopics
Using Radians in Trigonometric Functions
When using trigonometric functions like sine and cosine in calculus, converting angles to radians first ensures that the derivatives and integrals taken are accurate. For instance, the derivative of with respect to is only when is in radians.
Conversions in Programming
Many programming languages, such as Python and JavaScript, have built-in utilities that default to radians for trigonometric functions. When coding, it is prudent to keep this in mind and convert angle inputs to radians when necessary. For example, in Python:
Related reading
- How can I count how many horizontal brush strokes are required to draw an array of buildings?
- How can I create the cartesian product of a vector of vectors?
- How can I determine all possible ways a subsequence can be removed from a sequence?
- How can I find hole in a 2D matrix?
- How can I find the minimal circle include some given points?
- How can I find the number of Hamiltonian cycles in a complete undirected graph?
- How can I fit a Bézier curve to a set of data?
- How can I fit a curve to a 3d point cloud?

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.