Java .atan()

Sriparno08's avatar
Published Jul 19, 2021Updated Jun 11, 2025
Contribute to Docs

The Math.atan() method returns the inverse tangent (or arctangent) of the argument in radians.

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn to code in Java — a robust programming language used to create software, web and mobile apps, and more.
    • Beginner Friendly.
      17 hours

Syntax

Math.atan(n)

n is a double whose arctangent is returned.

Example

The following example uses Math.atan() to return the inverse tangent of 1.0:

public class Main {
public static void main(String[] args) {
double x = 1.0;
System.out.println(Math.atan(x));
// Output: 0.7853981633974483
}
}

All contributors

Contribute to Docs

Learn Java on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn to code in Java — a robust programming language used to create software, web and mobile apps, and more.
    • Beginner Friendly.
      17 hours