ForHosting KIT · Math

Regular decagon

A regular decagon with a side of 4 encloses an area of 123.107341 square units. Choose the measurement you need: the area, the perimeter, the interior angle, which is always 144°, or the 35 diagonals. 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
Side
4
Measurement
Area
You get
Value
123.107341

The regular decagon calculator takes a single number — the length of one side — and returns whichever measurement your task actually needs: the area the decagon encloses, the perimeter around its ten equal sides, the interior angle at each vertex, or the number of diagonals you can draw between its vertices. A regular decagon is fully determined by its side length, so every other property follows from exact closed-form formulas rather than numerical approximation.

Why one side is enough to know the whole decagon

A regular decagon has ten equal sides and ten equal angles, and its ten corners sit on a circle. Seen from the center, neighboring corners are exactly 36 degrees apart, so once you know the length of one side the rest of the shape is fixed. That is why every measurement here comes from a single number. The perimeter is ten times the side. The interior angle is 144 degrees at every corner, for a decagon of any size. The diagonals are a matter of counting rather than measuring: each corner connects to the seven corners that are not its neighbors, which gives 35 in total.

How the area is worked out, and the usual slips

The area is the only result that needs an irrational number: it is five halves times the side squared times the square root of five plus twice the square root of five, roughly 7.6942 times the side squared. A side of 4 gives 123.107341 square units. Because the side is squared, doubling it does not double the area but multiplies it by four. Keep the units apart as well: the area is in square units, the perimeter is in the same unit as the side and the angle is in degrees. The number of diagonals is always a whole number and is never rounded; the other results are rounded to the number of decimals you choose.

Why one side length is enough

A regular polygon has all sides equal and all interior angles equal, which means a single measurement — the side length — pins down the entire shape. For a decagon, the ten vertices lie on a circle, the central angle between consecutive vertices is exactly 36 degrees, and every other measurement reduces to a fixed multiple of the side. The perimeter is trivially ten times the side.

The interior angle is fixed at 144 degrees no matter how large the decagon is, because the interior angle of any regular n-gon depends only on n, not on its size. The diagonal count is likewise a pure combinatorial fact: from each of the ten vertices you can draw a diagonal to seven non-adjacent vertices, giving ten times seven divided by two, or 35 diagonals.

The area is the only measurement that involves an irrational constant: it equals five halves times the side squared times the square root of five plus two root five. Send the side, name the measurement, and the geometry is done.

What is a regular decagon?

A polygon with ten equal sides and ten equal interior angles. Because it is regular, its side length alone determines every other measurement.

What formula is used for the area?

The exact closed form for a regular decagon: A = (5/2) · s² · √(5 + 2√5), evaluated in double precision and rounded half-up to your chosen decimals.

What is the interior angle of a regular decagon?

It is always 144 degrees, whatever the length of the side. The interior angle of a regular polygon depends only on how many sides it has, so a small decagon and a huge one share the same corners.

How many diagonals does a decagon have?

It has 35. From each of the ten corners you can draw a diagonal to the seven corners that are not next to it, and dividing ten times seven by two removes the lines counted twice.

How do I find the perimeter of a regular decagon?

Multiply the side by ten, because all ten sides are equal. The perimeter comes out in the same unit as the side, so a side in centimeters gives a perimeter in centimeters.

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/decagon

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/decagon \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":4,"measurement":"area"}'
{
  "side": 4,
  "measurement": "area"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.decagon",
  "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.

One call replaces a formula lookup and a manual calculation, each result is rounded to a configurable number of decimal places, and the answer you see in the browser is the same answer your automated pipeline receives from the API.

Why one side length is enough

This endpoint evaluates that closed form in double precision, so you get an exact-formula answer rounded to the decimals you ask for rather than a Monte Carlo estimate or a table lookup.

Choosing the measurement parameter

Pass 'area' to get the enclosed surface in square units — the value is the side squared multiplied by about 7.6942, returned with half-up rounding to your chosen number of decimals. Pass 'perimeter' to get the total edge length, simply ten times the side, in the same unit you sent. Pass 'diagonals' to get the integer 35, the count of distinct line segments connecting non-adjacent vertices, which shows up in combinatorics exercises and graph-drawing problems. The API returns exactly one measurement per call, selected with the 'measurement' field, so your integration never has to parse fields it does not use. Pass 'interior_angle' to get the constant 144 degrees, useful when you are generating drawing instructions for a CAD tool or a turtle-graphics exercise and need the turn angle at each corner. The 'diagonals' result is always an exact integer and ignores the rounding parameter; the other three respect 'decimals', which defaults to six and can range from zero to twelve. If you need more than one measurement, make one call per measurement — at $0.002 per request, a full set of four costs a fraction of a cent.

Input rules, rounding and error handling

The contract is deliberately strict so that bad data fails fast and never silently produces a plausible-looking number. The measurement must be one of the four documented keywords; anything else is rejected with a list of the accepted values. Very large side lengths that push the area beyond double-precision range are rejected as non-finite rather than returned as Infinity. The side length must be a positive finite number: zero, negative values, NaN, Infinity, strings and missing fields are all rejected with an 'invalid_input' error and a message that says exactly what was wrong, and rejected calls are not billed. The optional 'decimals' field must be an integer between 0 and 12; fractional or out-of-range values are rejected too. Because the computation is pure arithmetic with no network access, no randomness and no clock reads, the same input always produces byte-identical output, which makes the endpoint safe to cache, memoize or embed in reproducible build pipelines.

Which measurements can I request?

Four: 'area' in square units, 'perimeter' in the same unit as the side, 'interior_angle' in degrees, and 'diagonals' as an integer count.

What happens if I send a negative or zero side?

The call is rejected with an 'invalid_input' error explaining that the side must be a positive number. Rejected calls are not billed.

How much does each call cost?

The browser widget is free. API calls cost $0.002 per request, so fetching all four measurements for one decagon is four requests.

Read the full KIT documentation →