Math

Inverse Tangent Calculator

Calculate arctan (tan⁻¹) - find the angle whose tangent equals a given value. Results in degrees and radians.

arctan(1) = 45.00°
Angle (θ)
45.0000°
Input tan(θ)
1
Angle (degrees)
45.0000°
Angle (radians)
0.785398
Exact value
π/4 rad
sin(θ)
0.707107
cos(θ)
0.707107

arctan returns values in the range (-90°, 90°) or (-π/2, π/2) radians.

What is inverse tangent?

The inverse tangent function, commonly written as arctan(x) or tan⁻¹(x), answers a fundamental question in trigonometry: given a ratio, what angle produces that ratio as its tangent? While the regular tangent function takes an angle and returns a ratio, the inverse tangent reverses this process, taking a ratio and returning the corresponding angle.

This function appears throughout mathematics, physics, engineering, and computer science. Whenever you need to determine an angle from the relationship between two perpendicular measurements, inverse tangent provides the solution. From calculating the angle of a ramp to determining the direction of a vector, arctan serves as an essential tool for working with angular measurements.

Definition and notation

The inverse tangent function is defined by the relationship:

θ=arctan(x)    tan(θ)=x\theta = \arctan(x) \iff \tan(\theta) = x

Several notations exist for this function:

  • arctan(x) - The most explicit notation, clearly indicating "the arc whose tangent is x"
  • tan⁻¹(x) - Common in calculators and textbooks, though potentially confusing since it doesn't mean 1/tan(x)
  • atan(x) - Used in most programming languages including JavaScript, Python, and C

The notation tan⁻¹(x) requires careful interpretation. Unlike x⁻¹ which means 1/x, the superscript -1 here indicates the inverse function, not a reciprocal. The reciprocal of tangent is cotangent, written as cot(x) or 1/tan(x).

Understanding the range

The tangent function is periodic and takes every real value infinitely many times, which creates a challenge for defining its inverse. To make arctan a proper function (with exactly one output for each input), we restrict its range to a single period.

The standard range for arctan is:

  • (-π/2, π/2) in radians
  • (-90°, 90°) in degrees

This range is called the principal value range. It includes all angles in the first and fourth quadrants, where the adjacent side of a right triangle is positive. The endpoints are excluded because tan(±90°) is undefined (approaches infinity).

This choice of range means arctan always returns an angle in the right half of the coordinate plane, regardless of the input value.

Common values

Memorizing key arctan values helps with quick calculations and checking your work:

xarctan(x) in degreesarctan(x) in radiansNotes
-∞-90°-π/2Approaches asymptotically
-√3 ≈ -1.732-60°-π/3
-1-45°-π/4Negative diagonal
-√3/3 ≈ -0.577-30°-π/6
00Horizontal direction
√3/3 ≈ 0.57730°π/6tan(30°)
145°π/4Perfect diagonal
√3 ≈ 1.73260°π/3tan(60°)
90°π/2Approaches asymptotically

The value arctan(1) = 45° is particularly important because it represents the angle where the opposite and adjacent sides are equal, forming an isosceles right triangle.

Conversion between degrees and radians

Angles can be expressed in either degrees or radians, and converting between them is straightforward:

Degrees=Radians×180π\text{Degrees} = \text{Radians} \times \frac{180}{\pi} Radians=Degrees×π180\text{Radians} = \text{Degrees} \times \frac{\pi}{180}

Most scientific calculators and programming languages return arctan values in radians by default. When working with practical applications like construction or navigation, you'll typically need to convert to degrees for more intuitive interpretation.

The radian is actually the more natural unit mathematically, which is why it's preferred in calculus and physics. One radian is the angle subtended by an arc equal in length to the radius of a circle, making it dimensionless in a sense.

Graph properties

The arctan function has several distinctive characteristics that make it useful in various applications:

Domain: All real numbers (-∞, ∞). Unlike arcsin and arccos which have restricted domains, arctan accepts any real input value.

Range: The interval (-π/2, π/2) or (-90°, 90°). The function never quite reaches these endpoints.

Horizontal asymptotes: The graph approaches y = π/2 as x approaches positive infinity and y = -π/2 as x approaches negative infinity. This bounded behavior makes arctan useful for normalizing unbounded inputs.

Passing through the origin: arctan(0) = 0, meaning the graph crosses through the point (0, 0).

Odd function: arctan(-x) = -arctan(x). The graph has rotational symmetry around the origin.

Monotonically increasing: The function always increases as x increases, meaning it's a one-to-one function with no repeated y-values.

Smooth curve: The function is continuous and differentiable everywhere, with a characteristic S-shaped curve that flattens out toward both ends.

Real-world applications

Finding angles in right triangles

The most direct application of arctan is finding angles when you know the lengths of the opposite and adjacent sides:

θ=arctan(oppositeadjacent)\theta = \arctan\left(\frac{\text{opposite}}{\text{adjacent}}\right)

For example, if a ladder reaches 12 feet up a wall while its base sits 5 feet from the wall, the angle with the ground is arctan(12/5) = arctan(2.4) ≈ 67.4°.

Slope and grade calculations

In road construction and surveying, the steepness of an incline is often expressed as a percentage grade. To convert a grade to an angle:

Angle=arctan(grade100)\text{Angle} = \arctan\left(\frac{\text{grade}}{100}\right)

A 6% grade (rising 6 feet for every 100 feet of horizontal distance) corresponds to an angle of arctan(0.06) ≈ 3.4°. Highway engineers use this calculation to ensure roads meet safety standards for vehicles.

Navigation and bearings

When determining the direction from one point to another on a map or coordinate system, arctan calculates the angle from the differences in coordinates:

Bearing=arctan(ΔxΔy)\text{Bearing} = \arctan\left(\frac{\Delta x}{\Delta y}\right)

GPS devices and navigation systems use this principle constantly to calculate headings and display direction information.

Physics and engineering

In physics, arctan appears in numerous contexts:

Projectile motion: The angle of a velocity vector relative to the horizontal is found using arctan(vy/vx).

Electric circuits: Phase angles in AC circuits are calculated using arctan when analyzing impedance.

Optics: The angle of refraction and critical angles involve inverse trigonometric calculations.

Mechanics: Force vector directions and resultant angles use arctan extensively.

Computer graphics and game development

Game engines and graphics software constantly calculate angles for:

  • Determining which direction a character should face
  • Calculating rotation angles for sprites and 3D models
  • Converting mouse positions to aiming directions
  • Computing camera angles and field of view

The atan2 function (discussed below) is particularly important in these applications.

The atan2 function

Standard arctan has a significant limitation: it only returns angles in the range (-90°, 90°), which covers only the right half of the coordinate plane. When you need to find the angle of a point that might be in any of the four quadrants, the two-argument arctangent function, atan2(y, x), provides the solution.

atan2(y,x)={arctan(y/x)if x>0arctan(y/x)+πif x<0 and y0arctan(y/x)πif x<0 and y<0+π/2if x=0 and y>0π/2if x=0 and y<0undefinedif x=0 and y=0\text{atan2}(y, x) = \begin{cases} \arctan(y/x) & \text{if } x > 0 \\ \arctan(y/x) + \pi & \text{if } x < 0 \text{ and } y \geq 0 \\ \arctan(y/x) - \pi & \text{if } x < 0 \text{ and } y < 0 \\ +\pi/2 & \text{if } x = 0 \text{ and } y > 0 \\ -\pi/2 & \text{if } x = 0 \text{ and } y < 0 \\ \text{undefined} & \text{if } x = 0 \text{ and } y = 0 \end{cases}

The atan2 function returns angles in the full range (-π, π] or (-180°, 180°], correctly handling all four quadrants. It also avoids division by zero when x = 0.

In programming languages, the argument order varies:

  • atan2(y, x) - Used in most languages (JavaScript, Python, C, Java)
  • atan2(x, y) - Used in some spreadsheet applications

Always check your language's documentation to confirm the argument order.

Derivatives and integrals

For calculus applications, these formulas are essential:

Derivative

ddxarctan(x)=11+x2\frac{d}{dx}\arctan(x) = \frac{1}{1 + x^2}

This remarkably simple derivative appears in many integration problems. The derivative is always positive (since the denominator is always greater than zero), confirming that arctan is strictly increasing.

Integral

arctan(x)dx=xarctan(x)12ln(1+x2)+C\int \arctan(x)\, dx = x \arctan(x) - \frac{1}{2}\ln(1 + x^2) + C

Related integral

The derivative formula leads to this important integral:

11+x2dx=arctan(x)+C\int \frac{1}{1 + x^2}\, dx = \arctan(x) + C

This integral appears frequently in physics and engineering calculations.

Series representation

The arctan function can be expressed as an infinite series, useful for computation and theoretical analysis:

arctan(x)=xx33+x55x77+=n=0(1)nx2n+12n+1\arctan(x) = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2n+1}

This series converges for |x| ≤ 1. The famous formula for π discovered by Leibniz comes from evaluating this series at x = 1:

π4=113+1517+\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots

While beautiful, this series converges slowly. Faster-converging formulas for π use arctan identities like Machin's formula.

Useful identities

Several identities help simplify calculations involving arctan:

Negative argument:

arctan(x)=arctan(x)\arctan(-x) = -\arctan(x)

Reciprocal relationship:

arctan(x)+arctan(1/x)=π2 for x>0\arctan(x) + \arctan(1/x) = \frac{\pi}{2} \text{ for } x > 0

Sum formula:

arctan(a)+arctan(b)=arctan(a+b1ab) when ab<1\arctan(a) + \arctan(b) = \arctan\left(\frac{a + b}{1 - ab}\right) \text{ when } ab < 1

Difference formula:

arctan(a)arctan(b)=arctan(ab1+ab)\arctan(a) - \arctan(b) = \arctan\left(\frac{a - b}{1 + ab}\right)

Common mistakes to avoid

Confusing tan⁻¹ with 1/tan: Remember that tan⁻¹(x) means arctan(x), not cotangent or 1/tan(x).

Wrong quadrant: Standard arctan only returns angles between -90° and 90°. If your problem involves angles in other quadrants, use atan2 or manually adjust the result.

Degree/radian confusion: Always verify whether your calculator or programming language is set to degrees or radians. A common error is mixing units in the same calculation.

Dividing by zero: When the adjacent side is zero, arctan(opposite/adjacent) fails. Use atan2 to handle this case, or recognize that the angle is ±90°.

Forgetting the sign: When both coordinates are negative, a simple arctan calculation may not give the expected angle. The atan2 function handles signs correctly.

Related functions

The three primary inverse trigonometric functions each have different domains and ranges:

arcsin(x) - Inverse sine

  • Domain: [-1, 1]
  • Range: [-90°, 90°] or [-π/2, π/2]
  • Returns the angle whose sine equals x

arccos(x) - Inverse cosine

  • Domain: [-1, 1]
  • Range: [0°, 180°] or [0, π]
  • Returns the angle whose cosine equals x

arctan(x) - Inverse tangent

  • Domain: All real numbers
  • Range: (-90°, 90°) or (-π/2, π/2)
  • Returns the angle whose tangent equals x

The unrestricted domain of arctan makes it particularly versatile, as it can accept any input value without producing errors.