Quadrant finder
The quadrant finder API takes the x and y coordinates of a point on the cartesian plane and tells you exactly where it sits: quadrant I, II, III or IV, on the x-axis, on the y-axis, or at the origin.
Run — free
It follows the standard mathematical convention — quadrant I is where both coordinates are positive, and the numbering proceeds counterclockwise. A zero coordinate is never forced into a quadrant: points lying on an axis are reported as axis points instead, which is the distinction most quick implementations get wrong. Both coordinates must be finite numbers; anything else returns a clear invalid-input error.
What the quadrant of a point means
The cartesian plane is split by the x-axis and the y-axis into four regions called quadrants. Quadrant I holds every point where x and y are both positive; moving counterclockwise, quadrant II has negative x and positive y, quadrant III has both coordinates negative, and quadrant IV has positive x and negative y. Knowing the quadrant of a point is more than a school exercise: it tells you the sign pattern of the coordinates without inspecting each value separately, which is exactly what trigonometry, physics simulations and game engines rely on when they interpret angles and vectors. A quadrant finder compresses that reasoning into one classification call. You send two numbers, and you receive either a quadrant number between one and four, or an explicit axis or origin location when a coordinate equals zero — because points on an axis belong to no quadrant at all, and conflating them with a quadrant is the classic off-by-one of coordinate geometry.
How the classification is decided
The rule is a strict sign test, applied in a fixed order so the result is always unambiguous. First the endpoint checks whether both coordinates are zero, in which case the point is the origin. Then it checks whether y is zero, which places the point on the x-axis, and whether x is zero, which places it on the y-axis. Only when both coordinates are non-zero does the sign of each one decide the quadrant: positive-positive is I, negative-positive is II, negative-negative is III, and positive-negative is IV. This ordering matters because a point like (0, 5) is on the y-axis, not in quadrant I or II, and (0, 0) is the origin rather than an arbitrary axis. Input validation is equally strict: each coordinate must be a finite number, so NaN, Infinity, missing fields and non-numeric values are rejected with an invalid-input error instead of producing a silently wrong classification.
Where it fits in real work
Educational tools use the endpoint to check student answers about the coordinate plane instantly and consistently. Game developers use quadrant logic to decide sprite orientation, minimap placement and collision regions, and this API lets server-side validation agree with the client. Data-visualization pipelines use it to bucket points into regions for coloring and annotation before rendering a scatter plot. Because the same deterministic code runs free in your browser on this page and on our edge for API calls, you can prototype a classification interactively and then automate it with confidence that the answers will match exactly. The call is stateless, stores nothing, and costs $0.002 per request when you call it through the API. For bulk work, send one request per point and aggregate the locations client-side; there is no batch variant, which keeps the contract — and its pricing — trivially predictable.
What you can do with it
Grade coordinate-geometry exercises
Check whether a student placed a point in the right quadrant without writing your own sign-test logic.
Bucket scatter-plot points for coloring
Classify each data point by quadrant or axis before rendering so each region gets its own color.
Validate game-world coordinates server-side
Confirm that a position sent by the client lands in the region the server expects for orientation logic.
FAQ
What does it cost?
$0.002 per request. It is also free to run in your browser on this page.
Which quadrant numbering does it use?
The standard convention: quadrant I is positive x and positive y, and numbering continues counterclockwise through IV.
What happens when a coordinate is zero?
The point is reported as on the x-axis (y = 0), on the y-axis (x = 0) or at the origin (both zero) — never as a quadrant.
What input is rejected?
Any coordinate that is missing or not a finite number, including NaN, Infinity and non-numeric text.
Is anything stored?
No. The coordinates are classified and discarded; only the location is returned.
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/math/coordinate-grid \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"x":-3.5,"y":2}'const res = await fetch("https://api.kit.forhosting.com/math/coordinate-grid", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"x": -3.5,
"y": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/coordinate-grid",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"x": -3.5,
"y": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/coordinate-grid", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"x":-3.5,"y":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"x":-3.5,"y":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/coordinate-grid", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"x": -3.5,
"y": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.coordinate_grid",
"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. |