ForHosting KIT · Math

Acute triangle calculator

Sides of 4, 5 and 6 form an acute triangle, because 6 squared, 36, is less than 41, the sum of the other two squares. Enter three sides and find out whether every angle is under 90 degrees without computing one. 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
4
B
5
C
6
You get
Sides
4, 5, 6
Classification
acute

check three sides, free

What makes a triangle acute

A triangle is acute when every one of its three interior angles measures less than 90 degrees. You do not need to compute any angle to know this. By the converse of the Pythagorean theorem, it is enough to look at the longest side: if its square is strictly smaller than the sum of the squares of the other two sides, the largest angle is below 90 degrees — and since no other angle can be larger, the whole triangle is acute.

The acute triangle calculator implements exactly this test. Given sides a, b and c it sorts them, compares z squared against x squared plus y squared, and returns acute: true only when the inequality holds strictly. A 4-5-6 triangle passes, because 36 is less than 41; the familiar 3-4-5 triangle does not, because 25 equals 25 and its largest angle is exactly 90 degrees, making it right rather than acute.

Validity comes before classification

Not every triple of positive numbers describes a triangle. The triangle inequality requires the longest side to be strictly shorter than the sum of the other two, and inputs like 1, 2 and 10 fail it outright — no triangle with those sides exists, so asking whether it is acute is meaningless. The same strictness applies to the sides themselves: each must be a positive finite number, so zeros, negatives, strings and NaN are all rejected with a clear message.

Because validation errors are classified as client faults, a rejected request is never charged. Only a well-formed triple that forms a genuine triangle receives a classification: acute when the largest angle is below 90 degrees, right when it equals 90, and obtuse when it exceeds it.

Deterministic results you can test against

The computation is pure arithmetic: three multiplications and one comparison after a sort of three elements. There is no randomness, no clock, no network call and no model involved, so the same input always produces byte-identical output on any machine. That property matters when you build on top of the result — a geometry pipeline can assert an exact response in its test suite, and a classroom exercise can rely on the answer being reproducible for every student.

Floating-point noise on near-right triangles is absorbed by a tiny relative epsilon, so a triangle whose sides only approximately satisfy the Pythagorean equality is reported as right rather than flip-flopping between acute and obtuse.

Filter acute triangles in a geometry dataset

Classify thousands of generated or measured triangles and keep only the acute ones, rejecting any triple that fails the triangle inequality.

Validate structural designs

Check that triangular trusses or braces with given member lengths are geometrically valid and know whether their largest angle stays below 90 degrees.

Grade classroom exercises automatically

Feed student-provided side lengths and verify both that the triangle exists and that the claimed classification as acute, right or obtuse is correct.

How does it decide without computing angles?

By the converse of the Pythagorean theorem: if the square of the longest side is smaller than the sum of the squares of the other two, the largest angle is below 90 degrees and the triangle is acute.

Is a 3-4-5 triangle acute?

No. Its longest side satisfies 5² = 3² + 4² exactly, so its largest angle is exactly 90 degrees and it is classified as right.

Is the result deterministic?

Yes. It is pure arithmetic with a fixed relative epsilon, so identical inputs always produce identical output on any machine.

What if my three sides cannot form a triangle?

You get a clear message instead of an answer. The longest side must be shorter than the other two combined, so sides such as 1, 2 and 10 describe no triangle at all.

What do I get besides a yes or no?

The sides sorted from shortest to longest and the type of triangle: acute when the largest angle is below 90 degrees, right when it is exactly 90, and obtuse when it is larger.

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/acute-triangle

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/acute-triangle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":4,"b":5,"c":6}'
{
  "a": 4,
  "b": 5,
  "c": 6
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.acute_triangle",
  "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 acute triangle API takes the three side lengths of a triangle and answers one precise question: are all three angles below 90 degrees? It first verifies that the sides can form a triangle at all — rejecting impossible inputs such as 1, 2, 5 — and then applies the converse of the Pythagorean theorem to the longest side. You get back a boolean answer, the sorted sides and the classification of the triangle as acute, right or obtuse, all computed deterministically in a single pass.

Validity comes before classification

This endpoint checks validity first and answers such requests with an invalid_input error that names the failing condition, instead of returning a misleading boolean.

Deterministic results you can test against

The same code that runs on our edge also powers the free calculator on this page, so what you test in the browser is exactly what the API returns when you automate it for $0.002 per request.

What does it cost?

$0.002 per request. It is also free to run in your browser on this page, with the same code the API uses.

What happens if the sides cannot form a triangle?

The request is rejected with an invalid_input error explaining the triangle inequality. Rejected requests are never charged.

What do I get back besides the boolean?

The three sides sorted ascending, the boolean acute flag, and the classification of the triangle as acute, right or obtuse.

Read the full KIT documentation →