Polar to rectangular converter
Turn a distance and a direction into x and y on the plane: a radius of 5 at 45° lands on the same value on both axes, 5 ÷ √2. Angles go in degrees or radians. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Resistance (Ω)
- 5
- Polar angle measure
- 45
- Angle unit
- Degrees
- Theta radians
- 0.7853981634
- Theta degrees
- 45
- X
- 3.5355339059
Polar coordinates describe a point by how far it is from the origin and which direction it points, while rectangular coordinates use horizontal and vertical displacements on the plane. Engineers, physics students, game developers, and surveyors switch between these frames constantly: a robot heading becomes a displacement vector, a complex phasor becomes real and imaginary parts, and a radar return becomes a map pin.
What polar and rectangular coordinates mean
In the polar plane a point is written (r, θ). The radius r is the distance from the origin when r is non-negative; the angle θ is measured from the positive x-axis, counterclockwise for positive angles. Rectangular—or Cartesian—coordinates write the same point as (x, y), where x is the projection onto the horizontal axis and y onto the vertical axis.
The conversion formulas are elementary once θ is in radians: x equals r times cosine of θ, and y equals r times sine of θ. When the angle arrives in degrees, convert first with θ_rad equals θ_deg times π divided by one hundred eighty, then evaluate cosine and sine with the host math primitives. A classic classroom example is r equals five and θ equals forty-five degrees: both x and y equal five over square root of two, about three point five three five five.
At θ equals zero, x equals r and y equals zero; at ninety degrees, x equals zero and y equals r. Zero radius always maps to the origin regardless of angle. This tool performs only that conversion: it does not invert rectangular to polar, does not wrap angles into a principal branch, and does not plot the point.
What you can do with it
Robotics, games, and animation displacement vectors
Turn heading-and-range commands into cartesian deltas for path planning, sprites, or physics without embedding ad-hoc Math calls in every service.
Survey, radar, and navigation map pins
Batch-convert polar returns or bearings-and-distances into rectangular offsets for plotting, GIS handoff, or engineering sketches.
FAQ
What formulas does the polar to rectangular converter use?
With θ in radians: x = r·cos(θ) and y = r·sin(θ). Degrees are converted with θ_rad = θ_deg·π/180 first.
Can I enter the angle in radians?
The default is degrees for classroom and drafting workflows.
Does this convert rectangular coordinates back to polar?
No. This capability only converts polar (r, θ) to rectangular (x, y). Use a rectangular-to-polar tool if you need the inverse.
Is the polar to rectangular converter free?
The browser tool is free and runs locally.
How do I convert a radius of 5 at 45° to x and y?
Multiply 5 by the cosine of 45° for x and by the sine of 45° for y. Both are 5 ÷ √2, so the point sits on the diagonal between the two axes.
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/polar-to-rectangular \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"r":5,"theta":45}'const res = await fetch("https://api.kit.forhosting.com/trig/polar-to-rectangular", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"r": 5,
"theta": 45
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/polar-to-rectangular",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"r": 5,
"theta": 45
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/polar-to-rectangular", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"r":5,"theta":45}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"r":5,"theta":45}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/polar-to-rectangular", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"r": 5,
"theta": 45
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.polar_to_rectangular",
"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.
Limits
max_abs_r | 1000000000000 |
max_abs_theta | 1000000000000 |
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 capability takes a finite polar radius r and angle θ—in degrees by default or in radians when you ask—and returns the rectangular pair x equals r times cosine of θ and y equals r times sine of θ as deterministic JSON. Negative radii are rejected by default so classroom distance workflows stay safe; enable allow_negative_r when you need the signed-radius convention used in some analytic geometry texts. There is no computer-algebra system, no plotter, no random seed, and no wall-clock dependency: the free browser tool and the prepaid API path share one pure solve function, so a homework check and a production script agree after fixed decimal rounding.
What polar and rectangular coordinates mean
The formulas are deterministic after at most one unit conversion—no series is re-implemented in userland, no sampling is required, and the result does not depend on locale, time zone, or network state—so graders, shaders, and API clients see the same rounded numbers every time.
How to call the API and what comes back
Use it from homework pipelines, interview-prep sandboxes, robotics and game tooling, survey and navigation scripts, or any workflow that needs reproducible polar-to-cartesian conversion without installing a computer-algebra package on every machine. Send a JSON body with r and theta. Field r is the polar radius; aliases radius, rho, and the ρ character map to the same meaning. Field theta is the polar angle; aliases angle, the θ character, and t also work. Optional angle_unit is degrees by default or radians when you pass radians (aliases unit and angle_mode). Optional allow_negative_r defaults to false; set it true only when your pipeline intentionally uses signed radii. On success the response echoes r, theta, angle_unit, and allow_negative_r; adds theta_radians and theta_degrees for convenience; returns x and y as rounded numbers; and includes method set to polar_to_rectangular plus a short formula block documenting the definitions. Failed validation—missing r or theta, a non-finite value, an unknown unit, a magnitude past published limits, or a negative r while negative radii are disallowed—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, negative radii, and related searches
Prefer well-known classroom pairs when checking by hand: r equals one at zero, thirty, forty-five, sixty, and ninety degrees match unit-circle tables after rounding. When working in radians, common inputs are zero, π over six, π over four, π over three, and π over two; set angle_unit to radians so the conversion step is skipped. Keep r non-negative unless you explicitly understand the signed-radius convention: a negative r with allow_negative_r true uses the same multiplications and lands at the opposite ray, which is equivalent to absolute r at θ plus π. If your data source sometimes emits negative distances by mistake, leave the default guard on and treat invalid_input as a data-quality signal rather than silently flipping the point. Absolute r and theta magnitudes are capped so intermediate IEEE doubles stay finite on the Worker and in the browser. This landing targets people searching for a polar to rectangular converter or an r theta to x y cartesian tool in degrees or radians; it is not a rectangular-to-polar inverter and does not solve polar equations. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners probe bad radii on purpose. After a successful call, a useful sanity check is that the Euclidean length of (x, y) equals the absolute value of r within floating tolerance, and that the angle of the vector matches θ modulo two π when r is positive.
Integration use cases
Homework and exam checks for polar–Cartesian conversion
Give students r and θ in degrees or radians; compare their hand-computed x and y against a deterministic API or free browser result.
Technical questions
What happens if r is negative?
By default negative radii are disallowed and the task returns invalid_input. Set allow_negative_r to true to accept signed r using the same formulas (equivalent to |r| at θ+π).