{
  "id": "inverse-tangent",
  "version": "715f482854b9",
  "status": "published",
  "name": "Inverse Tangent Calculator",
  "question": "What is the inverse tangent of x?",
  "summary": "Finds arctan x, the angle between −90° and 90° whose tangent is x, in degrees and radians, exact as a multiple of π for the special values.",
  "category": "math",
  "subcategory": "trigonometry",
  "url": "https://www.acalculator.org/math/inverse-tangent-calculator",
  "markdown": "https://www.acalculator.org/math/inverse-tangent-calculator.md",
  "kind": "function",
  "method": "arctan x is the angle θ between −90° and 90° (−π/2 and π/2) with tan θ = x. When x is within 10⁻¹⁴ (relative, for |x| > 1) of the tangent of a multiple of 15° in that range, the angle is that multiple exactly; otherwise it is computed in 64-bit floating point.",
  "assumptions": [
    "x is any number from −10¹⁵ to 10¹⁵.",
    "The answer is the principal value. Other angles with the same tangent are θ plus whole half turns (θ + 180°k)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "x": {
        "title": "Value x",
        "description": "Any number: the tangent of the angle.",
        "type": "number",
        "minimum": -1000000000000000,
        "maximum": 1000000000000000
      }
    }
  },
  "outputs": {
    "angle": {
      "label": "arctan x",
      "description": "The principal angle whose tan is x, in degrees.",
      "format": "quantity",
      "unit": "deg"
    },
    "radians": {
      "label": "In radians",
      "description": "The same angle in radians.",
      "format": "number"
    },
    "exact": {
      "label": "Exact angle",
      "description": "The angle as a multiple of π, when x is the value at a multiple of 15°.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "x": 1
    },
    "outputs": {
      "angle": 0.7853981633974483,
      "radians": 0.7853981633974483,
      "exact": "π/4 = 45° (tan 45° = 1)"
    },
    "text": "arctan(1) = 45°."
  },
  "examples": [
    {
      "given": {
        "x": 1
      },
      "expect": {
        "angle": 0.7853981633974483,
        "radians": 0.7853981633974483,
        "exact": "π/4 = 45° (tan 45° = 1)"
      },
      "source": "hand calculation in content.mdx: tan 45° = 1 and 45° is between −90° and 90°; OpenStax, Algebra and Trigonometry 2e, §8.3 Inverse Trigonometric Functions (arctan: domain all reals, range (−π/2, π/2)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/8-3-inverse-trigonometric-functions"
    },
    {
      "given": {
        "x": -1.7320508075688772
      },
      "expect": {
        "angle": -1.0471975511965976,
        "exact": "-π/3 = -60° (tan -60° = -√3)"
      },
      "source": "hand calculation in content.mdx: tan(−60°) = −tan 60° = −√3; OpenStax, Algebra and Trigonometry 2e, §8.3 Inverse Trigonometric Functions (arctan: domain all reals, range (−π/2, π/2)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/8-3-inverse-trigonometric-functions"
    },
    {
      "given": {
        "x": 2
      },
      "expect": {
        "angle": 1.1071487177940906
      },
      "source": "NIST DLMF §4.23 (inverse trigonometric functions, principal values), https://dlmf.nist.gov/4.23; Python 3: math.atan(2)"
    },
    {
      "given": {
        "x": -0.25
      },
      "expect": {
        "angle": -0.24497866312686414
      },
      "source": "NIST DLMF §4.23, https://dlmf.nist.gov/4.23; Python 3: math.atan(-0.25)"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §8.3 Inverse Trigonometric Functions (arctan: domain all real numbers, range (−π/2, π/2)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/8-3-inverse-trigonometric-functions (retrieved 2026-10-01)",
    "OpenStax, Algebra and Trigonometry 2e, §7.4 The Other Trigonometric Functions (special values of tangent). https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-4-the-other-trigonometric-functions (retrieved 2026-10-01)",
    "NIST Digital Library of Mathematical Functions, §4.23 Inverse Trigonometric Functions (principal values). https://dlmf.nist.gov/4.23 (retrieved 2026-10-01)"
  ],
  "related": [
    "tangent",
    "inverse-sine",
    "inverse-cosine",
    "slope"
  ],
  "changelog": []
}
