Star shape calculator
Get the area and perimeter of a regular pointed star from its number of tips and its two radii: five tips on radii 2 and 1 cover 5.877852522925 square units with an outline of 13.281310261041. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Points
- 5
- Outer radius
- 2
- Inner radius
- 1
- Area
- 5.8778525229
- Perimeter
- 13.281310261
- Edge length
- 1.3281310261
A regular pointed star is the familiar badge, flag, and ornament outline whose tips sit on one circle and whose valleys sit on a smaller concentric circle. Designers, teachers, laser-cut operators, and game artists usually know how many tips they want and the two radii of that outline; they do not start from a Schläfli density. This star shape calculator takes those three numbers — an integer point count of three or more, a positive outer radius, and a strictly smaller positive inner radius — and returns the filled area and the boundary perimeter of the isotoxal 2n-gon that traces tip-valley-tip all the way around.
What a regular pointed star is and how it differs from {n/d}
A regular pointed star, sometimes called an isotoxal star or a star polygon with independent inner and outer radii, is built from 2n vertices that alternate between two concentric circles. The n outer vertices sit at distance R from the center and become the visible tips. The n inner vertices sit at distance r from the center, with r strictly less than R, and become the valleys between tips.
Consecutive vertices are equally spaced in angle: the step from a tip to the next valley is π over n radians, so a full circuit visits 2n vertices and returns to the start. The filled region is a simple 2n-sided polygon, not the self-intersecting Schläfli star {n/d} that you get by connecting every d-th vertex on a single circle. That distinction matters for search intent.
People who type star shape calculator, pointed star area, or star perimeter from outer and inner radius already have both radii from a drawing, a die, or a CAD sketch. They want the paint area and the cut length of that outline. They do not have a density d, and they would be misled by a {n/d} area that derives an inner radius from trigonometry instead of taking the radius they measured.
Three-pointed, four-pointed, five-pointed, and six-pointed stars are all valid here as long as n is an integer of at least three. A two-pointed figure is not a star in this model and is rejected. When r approaches R the points flatten toward a regular 2n-gon; when r is much smaller than R the tips become long and sharp.
This calculator reports the exact closed-form area and perimeter of that family so you can size badges, ornaments, collision hulls, and homework figures without tracing vertices by hand.
Where a star shape calculator earns its keep
Star-shaped badges, medals, stickers, and ornaments are specified by tip count and two radii in almost every design file, yet area and perimeter are still derived by tracing vertices or by eyeballing a bitmap. A deterministic star shape calculator turns those three numbers into a paint area for coating estimates and a cut length for laser, vinyl, or CNC paths.
Teachers and exam writers who ask for the area of a regular five-pointed star given outer and inner radius need an oracle that uses the sector formula rather than a pentagram identity that ignores the given inner radius. Craft and wrapping workflows that tile stars on paper or fabric convert the perimeter into ribbon or stitching length and the area into material yield.
Landscape and event planners who lay star-shaped beds or stages convert a measured outer radius and a chosen inner radius into turf area and border length without opening a full CAD suite. Keep requests small, pin the rounded area and perimeter in tests, and you get reproducible star metrics for homework, LMS plugins, and edge workers without standing up a geometry kernel of your own.
What you can do with it
Classroom and homework checks
Students enter a tip count plus outer and inner radii and verify the closed-form area and perimeter against hand-drawn isotoxal stars.
Laser, vinyl, and CNC cut lists
Convert a frozen badge or ornament design into paint area and outline length before cutting or coating a regular pointed star.
FAQ
What happens if the point count is less than three?
A pointed star needs at least three tips, so two points, one point, or zero are rejected and are not billed.
Is this the same as a Schläfli star polygon {n/d}?
No. This calculator takes both radii as inputs and traces the simple tip-valley outline. A {n/d} star connects every d-th vertex on one circle and derives its own inner radius.
How do I find the area of a five-pointed star?
Multiply the number of tips by the outer radius, the inner radius and the sine of π divided by the number of tips. Five tips with radii 2 and 1 give 5.877852522925, the sum of the triangles fanning out from the centre.
How is the perimeter of the star worked out?
Each edge runs from a tip to a valley, so its length comes from the law of cosines using both radii and the angle π divided by the number of tips. The outline has twice as many edges as tips: 13.281310261041 for the five-pointed example.
What happens as the inner radius gets close to the outer one?
The tips flatten out until the outline looks like a regular polygon with twice as many sides. A much smaller inner radius gives long, sharp tips instead. The inner radius must always stay strictly smaller than the outer one.
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/math/star-shape \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"points":5,"outer_radius":2,"inner_radius":1}'const res = await fetch("https://api.kit.forhosting.com/math/star-shape", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"points": 5,
"outer_radius": 2,
"inner_radius": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/star-shape",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"points": 5,
"outer_radius": 2,
"inner_radius": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/star-shape", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"points":5,"outer_radius":2,"inner_radius":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"points":5,"outer_radius":2,"inner_radius":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/star-shape", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"points": 5,
"outer_radius": 2,
"inner_radius": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.star_shape",
"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
Point counts below three, missing fields, non-positive radii, and an inner radius that is not strictly inside the outer radius fail with invalid_input and are not billed.
Input contract, closed-form formulas, and error behaviour
Area uses the closed form A equals n times R times r times sin of π over n, which is the sum of the 2n triangular sectors from the center. Each edge of the outline joins a tip to a valley, so its length is the law of cosines square root of R squared plus r squared minus two R r cos of π over n. Perimeter is 2n times that edge. Results are rounded to twelve decimal places for stable goldens. Units are caller-defined: if you send millimetres you get square millimetres of area and millimetres of perimeter. POST a JSON body with three required fields. The field points is an integer greater than or equal to three and at most one million; aliases n, point_count, and tips mean the same thing. The field outer_radius is a positive finite number, the distance from the center to each tip; aliases R, r_outer, and outer are accepted. The field inner_radius is a positive finite number strictly less than outer_radius, the distance from the center to each valley; aliases r, r_inner, and inner are accepted. Each field may arrive as a JSON number or as a numeric string. Empty strings, missing fields, Infinity, and NaN fail with invalid_input naming the problem. If either radius is not positive, or if the inner radius is greater than or equal to the outer radius, the request is rejected because those inputs do not describe a regular pointed star. Those failures are not billed. On success the body echoes points, outer_radius, and inner_radius, then returns area, perimeter, edge_length, and a formula string.
Where a star shape calculator earns its keep
In all of those settings the value is a stable contract, named errors, and a search intent that matches how people actually query for star shape area and perimeter from points and two radii, at $0.002 per successful API call. This landing does not compute Schläfli star-polygon area, irregular star polygons, or three-dimensional star polyhedra; those are different queries and different capabilities.
Integration use cases
Game icons and collision fixtures
Freeze golden JSON for star pickups, rating glyphs, and HUD stars so collision area and outline length stay identical across builds.
Technical questions
How do I calculate the area and perimeter of a regular pointed star?
Send an integer points count of three or more, a positive outer_radius, and a strictly smaller positive inner_radius. The API returns area = n·R·r·sin(π/n) and perimeter = 2n·√(R²+r²−2Rr·cos(π/n)).
Which units does the star shape calculator use?
Any consistent linear unit you choose. If the radii are in millimetres, area is in square millimetres and perimeter is in millimetres; the API does not convert units.
What does the star shape calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.