ForHosting KIT · Travel & geography

Polar coordinate plane distance

Two points at radius 3, angle 0° and radius 4, angle 90° are exactly 5 apart: the law of cosines gives the straight-line distance between polar points without turning them into x and y first. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
R1
3
Theta1
0
R2
4
Theta2
90
You get
Distance
5
Delta theta
90
Angle unit
Degrees

Points in the plane are often written in polar form as a radius from the origin paired with an angle from a fixed reference ray. Robotics paths, antenna patterns, radar plots, and classroom trigonometry all need the straight-line distance between two such points without first converting every coordinate to Cartesian by hand. Angles may be supplied in degrees by default or in radians when you set the unit field. Negative radii are rejected because a polar radius is a non-negative distance from the origin.

What polar plane distance means and the law of cosines formula

In polar coordinates a point is written as the ordered pair radius and angle: the radius is the Euclidean distance from the chosen origin, and the angle measures how far the ray from the origin to the point has rotated from a fixed positive axis, usually the positive x-axis in the plane. The included angle at the origin is the absolute difference of the two polar angles. Taking the non-negative square root yields the Euclidean distance in the same length unit as the radii.

When the two points share the same ray and the same radius the distance is zero; when the included angle is ninety degrees the cosine term vanishes and the distance reduces to the Pythagorean sum of squares under a square root, recovering the classic three-four-five right triangle when the radii are three and four. When the points lie on opposite rays the cosine is negative one and the distance becomes the sum of the radii.

The formula is algebraically identical to converting both points to Cartesian coordinates with x equals r cos theta and y equals r sin theta and then applying the ordinary Euclidean formula; using the law of cosines keeps the computation in polar form and avoids an intermediate coordinate conversion step in client code that already stores sensors or plot data as radius-angle pairs.

Who measures distances between polar points

Classroom and tutoring platforms use a polar coordinate distance calculator so learners can check chord lengths between polar points without converting every exercise to Cartesian by hand and risking sign errors on the angles. Antenna and radar tooling often labels targets in polar form on a plan-position indicator, and a deterministic distance oracle is useful when scoring proximity alerts or grading lab reports. Failed validation does not consume balance.

Keep requests small, pin the rounded distance in tests, and you get reproducible planar distances for homework, LMS plugins, and edge workers without standing up a computer-algebra stack of your own. This tool is deliberately planar: for great-circle or ellipsoidal ground distance between geographic lat-lon pairs use a dedicated geodesic capability instead of polar law of cosines.

Classroom polar geometry checks

Let students submit two (r, θ) points and verify the chord length against the law of cosines without manual Cartesian conversion.

Robotics and local polar ranging

Compute straight-line distance between two sensor returns stored as radius and heading from a shared local origin.

Radar and plan-position tooling

Score proximity between polar-labelled targets on a PPI display with a deterministic planar distance oracle.

Can I supply angles in radians?

Both theta1 and theta2 are interpreted in that unit.

Why are negative radii rejected?

In this calculator a polar radius is a non-negative distance from the origin.

Is this great-circle or geographic distance?

No. It is planar Euclidean distance in polar form via the law of cosines. For lat/lon geodesics use a dedicated geo distance capability.

What formula does the polar distance calculator use?

The law of cosines: the distance is the square root of the first radius squared plus the second radius squared, minus twice both radii times the cosine of the angle between them. It matches converting both points to x and y.

What if the two points lie on opposite rays?

Then the cosine of the angle between them is negative one and the distance is simply the sum of the two radii. On the same ray with the same radius, the distance is zero.

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.

POSThttps://api.kit.forhosting.com/geo/polar-distance

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.

curl -X POST https://api.kit.forhosting.com/geo/polar-distance \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"r1":3,"theta1":0,"r2":4,"theta2":90}'
{
  "r1": 3,
  "theta1": 0,
  "r2": 4,
  "theta2": 90
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.polar_distance",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Input contract, response shape, angle units, and error behaviour

Optional angle_unit selects degrees (the default) or radians for both angles; aliases such as unit and angle_mode are accepted. Each numeric field may arrive as a JSON number or as a decimal numeric string; missing fields, empty strings, non-finite values, and values whose absolute magnitude exceeds the published bound fail with invalid_input naming the field. On success the body echoes the rounded inputs, returns distance as the planar chord length, delta_theta as theta2 minus theta1 in the same unit as the angles, angle_unit as the resolved unit string, method set to planar_law_of_cosines, and a short formula string restating the law of cosines identity for display next to the answer. Pair the response with your own plotter if you need a sketch of the two rays and the chord; this endpoint computes distance only and does not emit graphics, geodetic corrections, or spherical trigonometry.

Where a polar distance API earns its keep and how pricing works

Robotics and embedded teams store ranging data as radius and heading from a local origin; calling a tiny parse API keeps path-planning notebooks free of duplicated trig helpers.

How do I compute distance between two polar points?

Send non-negative r1 and r2 with angles theta1 and theta2. The API returns d = sqrt(r1² + r2² − 2·r1·r2·cos(θ2−θ1)) using degrees by default.

What does the polar distance calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →