ForHosting KIT · Math

Polygon angle

Type the number of sides and get both angles of a regular polygon at once: a pentagon has interior angles of 108° and exterior angles of 72°. You also get the interior sum, 540° for that pentagon. 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
Sides
5
You get
Interior angle deg
108
Exterior angle deg
72
Interior angle sum deg
540
Exterior angle sum deg
360

A regular polygon is a closed plane figure whose sides are all equal and whose interior angles are all equal. Geometry homework, CAD constraints, tile layouts, and procedural mesh code all need the same two degree measures once the side count is known: each interior angle and each exterior angle. This polygon angle calculator accepts an integer side count of three or more and returns both angles in degrees from the school identities ((n minus two) over n) times one hundred eighty for the interior angle and three hundred sixty over n for the exterior angle.

What interior and exterior angles mean for a regular polygon

For any simple polygon with n sides the sum of the interior angles is always (n minus two) times one hundred eighty degrees. That identity comes from triangulating the polygon: an n-gon splits into n minus two triangles, and each triangle contributes one hundred eighty degrees. When the polygon is regular, every interior angle is equal, so each interior angle is that total sum divided by n, which is the same as ((n minus two) over n) times one hundred eighty.

The exterior angle at a vertex is the turn you make when you walk the boundary: for a regular n-gon each exterior angle is three hundred sixty divided by n. Interior and exterior angles at the same vertex are supplementary, so they always add to one hundred eighty degrees; that is a useful sanity check after you read the response. A square therefore has each interior angle ninety and each exterior angle ninety.

A regular pentagon has each interior one hundred eight and each exterior seventy two. An equilateral triangle has each interior sixty and each exterior one hundred twenty. These two per-vertex measures appear in classroom exercises, drafting constraints, and turtle-style walks that generate regular meshes, so returning them together from a single side count avoids two separate lookups that can drift if someone mixes radians with degrees or applies the irregular-polygon formula by mistake.

Where a polygon angle calculator earns its keep

Classrooms use a polygon angle calculator so students can check homework for heptagons and dodecagons without memorizing a long table of special cases. CAD and architecture scripts need each interior angle when they validate regular floor plans, column layouts, or decorative tiles that must meet at known turns. Game and graphics pipelines generate regular n-gons for UI badges, radar charts, and procedural props; knowing the exterior turn angle of three hundred sixty over n drives a clean turtle-style walk around the shape.

Failed validation does not consume balance.

Classroom regular-polygon checks

Let students request angle measures for side counts from three upward and verify each interior angle and each exterior angle against textbook formulas.

CAD and layout validation

Confirm that a regular n-gon tile or plan uses the expected interior and exterior degrees before baking geometry into a design file.

Procedural mesh and UI shapes

Drive turtle turns of three hundred sixty over n when generating regular polygons for charts, badges, or game props with deterministic angles.

How do I find the interior and exterior angles of a regular polygon?

Send an integer sides count of three or more. Each interior angle is ((n−2)/n)×180° and each exterior angle is 360°/n. Both come back in degrees.

What happens if the side count is 2 or a decimal?

A polygon needs an integer side count of at least 3, so two sides or a non-integer are rejected without charge.

Are the angles returned in degrees or radians?

Convert to radians client-side if your pipeline expects radians.

Why do interior and exterior angles of a regular polygon add to 180°?

At each vertex the interior angle and the exterior turn are supplementary. The identities ((n−2)/n)×180 and 360/n therefore sum to 180 for every n≥3, which is a useful check on the response.

What is the sum of the interior angles of a polygon?

It is (n − 2) × 180°, because any polygon with n sides splits into n − 2 triangles. A pentagon therefore totals 540°, and the exterior angles of any polygon always add up to 360°.

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/polygon-angle

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/polygon-angle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sides":5}'
{
  "sides": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.polygon_angle",
  "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.

Side counts that are missing, not integers, or smaller than three fail with invalid_input and are not billed.

What interior and exterior angles mean for a regular polygon

This endpoint always assumes a convex regular n-gon in the plane and reports degrees only, which matches the vast majority of homework problems and UI tooling that expect school-style angle measures rather than radians.

Input contract, formulas, and error behaviour

The interior sum is exactly (n minus two) times one hundred eighty and is always an integer for integer n. Exterior sum is always three hundred sixty by definition. If you need radians, convert client-side by multiplying degrees by pi over one hundred eighty; this capability stays in degrees so educational materials and drafting tools that already speak degrees need no extra conversion step. POST a JSON body with a single required field sides: an integer greater than or equal to three and at most one million. The aliases n and n_sides are accepted and mean the same thing. Values below three fail with invalid_input because a polygon needs at least three sides; non-integers, missing fields, and a count above the published maximum also fail with invalid_input and are not billed. On success the body contains sides, interior_angle_deg, exterior_angle_deg, interior_angle_sum_deg, exterior_angle_sum_deg, and a short formula string that restates the identities used. Pair the response with your own drawing code when you must place vertices; the API computes angle measures only and does not emit coordinates.

Where a polygon angle calculator earns its keep

Bound the side count, keep the request small, and you get reproducible degree measures you can pin in tests, notebooks, and edge workers without standing up a geometry library of your own.

What does the polygon angle calculator cost?

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

Read the full KIT documentation →