Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Python Tutorial
  • Interview Questions
  • Python Quiz
  • Python Glossary
  • Python Projects
  • Practice Python
  • Data Science With Python
  • Python Web Dev
  • DSA with Python
  • Python OOPs
Open In App
Next Article:
degrees() and radians() in Python
Next article icon

degrees() and radians() in Python

Last Updated : 12 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

In geometry and trigonometry, we often switch between degrees and radians. Python’s math module provides two simple functions to handle these conversions:

  • math.radians() – Converts degrees to radians
  • math.degrees() – Converts radians to degrees

Let’s explore both with examples:

math.radians()

This function takes a degree value and returns its equivalent in radians.

Syntax

math.radians(x)

Parameters:

  • x: Angle in degrees (float or int)

Returns: Angle in radians (float)

Example 1: Convert Degrees to Radians

Python
import math  x = 180 print("Radians:", math.radians(x)) 

Output
Radians: 3.141592653589793 

Explanation: 180 degrees is exactly π radians.

Example 2: Convert 1 Degree and Fractional Degree

Python
import math  a = 1 b = 180 / math.pi  print("1° in Radians:", math.radians(a)) print("180/π° in Radians:", math.radians(b)) 

Output
1° in Radians: 0.017453292519943295 180/π° in Radians: 1.0 

Explanation: 180/π degrees equals exactly 1 radian.

math.degrees()

This function takes a radian value and returns its equivalent in degrees.

Syntax

math.degrees(x)

Parameters:

  • x: Angle in radians (float or int)

Returns: Angle in degrees (float)

Example 3: Convert Radians to Degrees

Python
import math  x = math.pi print("Degrees:", math.degrees(x)) 

Output
Degrees: 180.0 

Explanation: π radians is exactly 180 degrees.

Example 4: Convert 1 Radian and π/180 Radians

Python
import math  a = 1 b = math.pi / 180  print("1 Radian in Degrees:", math.degrees(a)) print("π/180 Radians in Degrees:", math.degrees(b)) 

Explanation: 1 radian ≈ 57.3°, and π/180 radians equals 1 degree.

Applications

  • Geometry and trigonometry problems
  • Astronomical computations
  • Graphing and simulations
  • Rotational transformations in graphics

Related Articles:

  • Python Math Module
  • Python Tutorial

Next Article
degrees() and radians() in Python

M

manjeet_04
Improve
Article Tags :
  • Misc
  • Python
  • Python-Built-in-functions
Practice Tags :
  • Misc
  • python

Similar Reads

    numpy.radians() and deg2rad() in Python
    The numpy.radians() is a mathematical function that helps user to convert angles from degree to radians. Syntax : numpy.radians(x[, out]) = ufunc 'radians') Parameters : array : [array_like] elements are in degrees. out : [ndaaray, optional]Output array of same shape as x. 2pi Radians = 36o degrees
    2 min read
    numpy.degrees() and rad2deg() in Python
    The numpy.degrees() is a mathematical function that helps user to convert angles from radians to degrees. Syntax : numpy.degrees(x[, out]) = ufunc 'degrees') Parameters : array : [array_like] elements are in radians. out : [ndaaray, optional] Output array of same shape as x. 2pi Radians = 360 degree
    2 min read
    turtle.degrees() function in Python
    The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.degrees() This method is used to set angle measurement units to degrees. By
    1 min read
    Convert angles from radians to degrees in a NumPy array
    In this article, we will discuss how to convert array elements consisting of different angles as radian to degree. To convert an angle from radians to degrees we need to simply multiply the radians by 180°/Π?. We can also use the numpy.rad2deg() method to perform the same operation. Now suppose w
    2 min read
    Program to Convert Radian to Degree
    Before moving to the actual solution, let's try to find out what is a degree, a radian, and their relations. Radian: The radian is the standard unit of angular measure, used in many areas of mathematics. The length of an arc of a unit circle is numerically equal to the measurement in radians of the
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences