ForHosting KIT · Math

Ptolemy theorem calculator

Solve a missing side or diagonal of a quadrilateral inscribed in a circle with Ptolemy's theorem: with sides 3, 4, 5 and 6 and one diagonal of 5, the other diagonal is 7.8, since both products come to 39. 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
A
3
B
4
C
5
D
6
Power (W)
5
Decimal places
6
You get
Q
7.8
Left
39
Right
39

For cyclic quadrilateral: ac+bd=pq; solve missing side/diagonal. Search intent: ptolemy theorem calculator. No network calls or random seeds are required. Failed jobs are not billed.

What Ptolemy's theorem says

Ptolemy's theorem is about quadrilaterals whose four corners lie on the same circle, called cyclic quadrilaterals. Name the corners A, B, C and D in order around the circle, so the sides are a from A to B, b from B to C, c from C to D and d from D to A, and the diagonals are p from A to C and q from B to D. The theorem says that a times c plus b times d equals p times q: the two products of opposite sides add up to the product of the diagonals. Give five of the six lengths and the sixth follows from that single equation.

How to use it and where people slip

Leave empty the one length you want, and the calculator solves the equation for it, showing both sides so you can see that they match. With sides 3, 4, 5 and 6 and a diagonal of 5, both sides come to 39 and the missing diagonal is 7.8. The usual slips are pairing neighboring sides instead of opposite ones, labeling the corners out of order around the circle, and using the rule on a quadrilateral that is not inscribed in a circle, where it does not hold. Results can be rounded once, at the end, to the decimals you choose.

Teaching

Pinned goldens.

What does Ptolemy's theorem say?

In a quadrilateral whose four corners lie on one circle, the product of the two diagonals equals the sum of the products of opposite sides: a times c plus b times d equals p times q.

How do I find a missing diagonal with Ptolemy's theorem?

Enter the four sides and the diagonal you know, and leave the other one empty. With sides 3, 4, 5 and 6 and a diagonal of 5, the other diagonal is 7.8, because 3 times 5 plus 4 times 6 is 39, and 39 divided by 5 is 7.8.

Does Ptolemy's theorem work for any quadrilateral?

No. The equality only holds when the quadrilateral is cyclic, meaning all four corners lie on the same circle. For other quadrilaterals the two sides of the equation do not match, so check the shape before trusting a solved length.

Which sides count as opposite in Ptolemy's theorem?

Going around the circle in the order A, B, C, D, side AB is opposite CD and side BC is opposite DA. The diagonals join opposite corners, AC and BD. Mixing up this order is the most common reason for a wrong answer.

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/math/ptolemy-theorem

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/math/ptolemy-theorem \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":3}'
{
  "a": 3
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.ptolemy_theorem",
  "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.

The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

How it works

For cyclic quadrilateral: ac+bd=pq; solve missing side/diagonal. ac + bd = pq. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

Inputs, limits and rounding

Optional decimals use half-up once. Optional output fields are omitted, never null. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Provide required JSON fields with DOM-safe names. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks,

When to use it

Use when search intent matches. For cyclic quadrilateral: ac+bd=pq; solve missing side/diagonal. EN-only delivery; Nitro hydrates locales. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

Quick check

Free widget.

Automation

API same JSON.

Free?

Yes tier A.

Network?

No.

Bad input?

invalid_input.

API?

Yes.

Locales?

EN-only; Nitro hydrates.

Read the full KIT documentation →