Arctangent calculator
The arctangent of 1 is 45°, or 0.7853981634 radians: a slope that rises as much as it runs. Give two components instead and you get the full-plane heading with its quadrant, so every direction lands where it belongs. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 1
- Radians
- 0.7853981634
- Degrees
- 45
The arctangent is the inverse of the tangent function: given a real slope or a pair of Cartesian components, it recovers the directed angle whose tangent matches that ratio. Students use atan when a right triangle gives opposite over adjacent and they need the elevation angle; engineers and game developers use atan2 when a vector (x, y) must map to a full-plane heading that respects every quadrant. Controllers, graphics pipelines, navigation helpers, and homework checkers all need a deterministic numeric answer they can pin in continuous integration rather than a calculator screenshot that only works for one labeled figure.
What arctangent and atan2 compute, and when each mode is the right tool
In real trigonometry the principal arctangent of a number t is the unique angle theta in the open interval from negative ninety degrees to positive ninety degrees whose tangent equals t. That range is ideal when you already know the ratio opposite over adjacent and you are working in a right triangle or a graph of a line through the origin in the right half-plane sense of slope.
Two-argument atan2(y, x) extends the idea to the full plane: it returns the polar argument of the point (x, y) in the half-open interval from negative one hundred eighty degrees to positive one hundred eighty degrees, correctly placing vectors in every quadrant and on the axes. Search intent clusters around phrases like arctangent calculator, atan degrees, atan2 x y, inverse tan online, and convert slope to angle.
People want a numeric result they can check against a worksheet answer key, a sensor heading, or a game character facing, not only a symbolic identity that tan of arctan of t equals t for finite t.
How this calculator validates input, chooses atan or atan2, and rejects the origin
Omitting everything also fails. Each present field must be a finite number; numeric strings are accepted after trim, but empty strings count as absent. When value is given alone, the engine calls atan and multiplies by one hundred eighty over pi to expose degrees alongside radians, echoing the input value in the response.
Otherwise Math.atan2(y, x) produces the principal argument, degrees are derived the same way, and a quadrant label classifies the vector into I through IV or an axis name such as plus x or minus y. Edge cases are explicit: non-finite components, partial atan2 pairs with only x or only y, mixed modes, and the zero vector all fail before a fake angle is returned.
Practical use, limits, pricing, and delivery channels
Use the browser tool when you want an immediate arctangent or atan2 result while checking homework, verifying a slope-to-angle conversion, or confirming a 2D heading without installing a computer-algebra system. Accepted inputs are finite reals only: there is no complex branch, no multi-value inverse family beyond the principal atan and atan2 ranges documented above, and no automatic unit conversion of an already-known angle that is not produced by inverse tangent.
Results are fully deterministic: the same value, or the same x and y pair, always yields the same radians, degrees, method tag, and optional quadrant label. There is no language model, no external geometry service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials.
What you can do with it
Homework and exam inverse-tangent drills
Students and graders confirm atan of a slope or atan2 of planar components, including clear rejection when both x and y are zero.
FAQ
What is the difference between atan and atan2 here?
atan(value) returns an angle in (−90°, 90°). atan2(y, x) returns a full-plane argument in (−180°, 180°] with correct quadrant placement.
What happens if both x and y are zero?
Atan2 is undefined at the origin; those calls are not charged.
Is the arctangent calculator free?
The browser tool runs free on your device.
Can I send value together with x and y?
No. Provide either value alone or both x and y.
What is the arctangent of 1?
It is 45 degrees, or about 0.7853981634 radians. A slope of 1 rises exactly as much as it runs, so the line sits halfway between horizontal and vertical.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/trig/inverse-tan \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":1,"y":1}'const res = await fetch("https://api.kit.forhosting.com/trig/inverse-tan", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 1,
"y": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/inverse-tan",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 1,
"y": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/inverse-tan", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":1,"y":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":1,"y":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/inverse-tan", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 1,
"y": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.inverse_tan",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capacity accepts either a single value for classic atan, or both x and y for atan2, rejects the undefined origin where both components are zero, and returns the angle in radians and degrees as structured JSON.
What arctangent and atan2 compute, and when each mode is the right tool
Delivering both radians and degrees as JSON makes the result easy to paste into notes, diff in automated tests, or feed into a larger pipeline without reimplementing degree conversion and quadrant logic in every language you teach or deploy across homework portals and engineering scripts that already store angles in mixed unit conventions.
How this calculator validates input, chooses atan or atan2, and rejects the origin
Send a JSON body with either the field value for one-argument arctangent, or both fields x and y for two-argument atan2. Do not mix the modes: providing value together with x or y fails with invalid_input so the intended inverse stays unambiguous. When x and y are both present, the engine first checks the origin rule: if both components are exactly zero, atan2 is undefined because no direction angle exists, and the request fails with invalid_input naming that both x and y are zero so those failed calls are not charged. Results are rounded to a stable decimal precision so the same input always yields the same JSON across engines.
Practical use, limits, pricing, and delivery channels
Each successful request is one billable item at $0.002; failed validation does not consume balance. Wire the endpoint into slope calculators, vector heading demos, contest answer checkers, engineering worksheets that list a tangent ratio or a planar offset, or floating preprocessing steps where you already prefer an explicit origin error over opaque black-box widgets that cannot show why zero over zero has no direction.
Integration use cases
Deterministic fixtures for graphics and robotics tests
Pipelines that seed unit tests for 2D headings or camera pan angles can call a pure arctangent oracle instead of reimplementing atan2 in every language.
Sensor and navigation heading recovery
Field notes or IMU-derived offsets that store x and y recover a stable degree and radian heading as structured JSON for logs or lightweight map helpers.
Technical questions
How do I compute arctangent with this API?
Send value for atan, or both x and y for atan2, to trig.inverse_tan. The response returns radians, degrees, and the method used.