Polygon interior angle calculator
Enter how many sides a regular polygon has and get its angles: in a pentagon the interior angles add up to 540°, each one measures 108° and each exterior angle 72°. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 5
- Interior angle sum deg
- 540
- Interior angle deg
- 108
- Exterior angle deg
- 72
- Exterior angle sum deg
- 360
A regular polygon is a closed shape with n equal sides and n equal interior angles. Geometry students, architects, CAD pipelines, and game developers repeatedly need three related numbers for that shape: the sum of all interior angles, the measure of each interior angle, and the measure of each exterior angle. Send an integer n of three or more and receive the interior sum in degrees, the per-angle interior measure, the per-angle exterior measure, and the constant exterior sum of three hundred sixty degrees. No spreadsheet cells, no copy-paste mistakes, and the same pure logic runs free in your browser before you wire the paid automation path.
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.
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, and the exterior angles always sum to a full turn of three hundred sixty degrees whether the polygon is regular or not. A square therefore has interior sum three hundred sixty, each interior angle ninety, and each exterior angle ninety. A regular pentagon has interior sum five hundred forty, each interior one hundred eight, and each exterior seventy two.
An equilateral triangle has interior sum one hundred eighty, each interior sixty, and each exterior one hundred twenty. These three measures appear in classroom exercises, drafting constraints, and procedural mesh generation, so returning them together avoids three separate lookups that can drift if someone uses the wrong formula for concave or irregular shapes.
Where these angle measures come in handy
Classrooms use a polygon interior 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.
What you can do with it
Classroom regular-polygon checks
Let students request angle measures for n from three upward and verify interior sum, per-angle interior, and exterior values 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.
FAQ
How do I calculate the interior angles of a regular polygon?
Interior sum is (n−2)×180°, each interior angle is that sum divided by n, and each exterior angle is 360°/n.
What happens if n is below 3?
A polygon needs at least three sides, so n less than three is rejected without charge.
Are the angles returned in degrees or radians?
All angle fields are in degrees. Convert to radians client-side if your pipeline expects radians.
Does this work only for regular polygons?
Yes. Per-angle interior and exterior equality assumes a regular (equilateral and equiangular) n-gon.
How do I find the exterior angle of a regular polygon?
Divide 360 by the number of sides, so a regular pentagon has exterior angles of 72 degrees. It is the turn you make at each corner as you walk around the shape, and the turns always add up to 360.
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/geom/polygon-interior-angle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":5}'const res = await fetch("https://api.kit.forhosting.com/geom/polygon-interior-angle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/polygon-interior-angle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/polygon-interior-angle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/polygon-interior-angle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"n": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.polygon_interior_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
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 polygon interior angle calculator turns the classic school formulas into a single deterministic API call.
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 n: an integer greater than or equal to three and at most one million. Values below three fail with invalid_input because a polygon needs at least three sides; non-integers, missing fields, and n above the published maximum also fail with invalid_input and are not billed. On success the body contains n, interior_angle_sum_deg, interior_angle_deg, exterior_angle_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 API earns its keep
Bound n, 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.
Technical questions
What does the polygon interior angle calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.