Hexagon calculator
A regular hexagon with a side of 2 has a perimeter of 12 and an area of about 10.3923. Type the one length you know and get the surface for material and the outline for trim or edging. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Side
- 2
- Area
- 10.3923048454
- Perimeter
- 12
A regular hexagon is the unique convex six-sided polygon whose sides are all equal and whose interior angles are all equal, each measuring one hundred twenty degrees. People who search for a hexagon calculator almost always already know one number—the side length of a tile, nut, honeycomb cell, gazebo floor, bolt head, or decorative panel—and they need two plane measures from it: the enclosed area and the outer perimeter.
What a regular hexagon is and how area and perimeter follow from one side
A regular hexagon has six equal sides and six equal interior angles of one hundred twenty degrees. Connecting the centre to the six vertices partitions the figure into six congruent equilateral triangles whose side equals the hexagon side length s; the area of the hexagon is therefore six times the area of one equilateral triangle, and the perimeter is simply six times s.
Equivalent identities include A = (3/2)·s·a where a is the apothem (√3/2)·s, and the general regular n-gon formula A = (n·s²)/(4·tan(π/n)) with n equal to six; all of these are algebraically the same for a perfect regular hexagon. The implementation uses (3√3/2)·s² so a single deterministic floating-point path never depends on a library tangent of π/6.
Where a regular hexagon calculator earns its keep
Architecture and interior design use regular hexagonal tiles, windows, and floor plates; knowing area from the published edge length sizes material orders, while the perimeter sizes trim, gasket, or edge banding. Manufacturing of hexagonal nuts, bolt heads, plaques, and honeycomb panels needs the same pair of numbers when quoting stock and when nesting blanks on a sheet.
Game and map engines that place hexagonal rooms, cells, or collision hulls often store side length as the canonical size and must convert to area for paint, lighting, or physics density and to perimeter for outline shaders. Landscaping a six-sided bed or gazebo floor follows the same arithmetic: mulch volume starts from area, edging length starts from perimeter. Beekeepers and biomimetic designers treat honeycomb cells as regular hexagons and convert comb size into wax area and rim length in one step.
Keep requests small, pin the rounded area and perimeter in tests, and you get reproducible plane measures for homework, LMS plugins, CAD macros, and edge workers without standing up a general polygon library when the only figure that matters is the regular hexagon.
What you can do with it
Hexagonal tile, honeycomb, and plaque fabrication
Convert a published hexagon edge length into area for stock, coating, or wax, and into perimeter for trim, gasket, or edge banding.
Game, CAD, and landscape layout
Derive fill area and outline length from a side-based hexagon size for hex maps, collision hulls, gazebo floors, and six-sided beds.
FAQ
What happens if the side length is zero, negative, or not a number?
Side length must be a finite number strictly greater than zero; rejected values are not billed.
Is this the same as a hexagon apothem, a hexagonal prism, or a hexagonal number?
No. This tool measures a regular plane hexagon. An apothem is the inradius (√3/2)·s, a hexagonal prism is a solid, and a hexagonal number is the figurate sequence H(n)=n(2n−1).
Which units does the hexagon calculator use?
None are assumed. Area uses the square of the input unit and perimeter uses the same linear unit as side—millimetres in, mm² and mm out.
How do I find the area of a regular hexagon from its side?
Square the side and multiply it by three times the square root of three, then halve the result. The formula comes from splitting the hexagon into six equilateral triangles, so a side of 2 gives an area of about 10.3923.
How far is the centre of a regular hexagon from a corner?
Exactly one side length, and the long diagonal from corner to opposite corner is twice the side. This calculator reports only the area and the perimeter, but both of those follow from the same single length.
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/hexagon \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"side":2}'const res = await fetch("https://api.kit.forhosting.com/math/hexagon", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"side": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/hexagon",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"side": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/hexagon", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"side":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"side":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/hexagon", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"side": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.hexagon",
"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 tool accepts a single positive finite side length, applies the closed forms A = (3√3/2)·s² and P = 6s, and returns both values together with a short formula string you can show next to the answer. Non-positive or non-finite side values fail with invalid_input instead of a silent NaN.
What a regular hexagon is and how area and perimeter follow from one side
The area of an equilateral triangle of side s is (√3/4)·s², so the closed-form hexagon area is A = 6·(√3/4)·s² = (3√3/2)·s². The perimeter needs no roots at all: P = 6s. This landing is not a general n-gon solver, not a hexagon-apothem tool, and not a hexagonal-prism or hexagonal-number calculator; people who search for a hexagon calculator want the two plane measures of the regular six-sided figure from the one number they already have. Related lengths such as the apothem, the circumradius (which equals s for a regular hexagon), and the long diagonal 2s can be derived from s, but this endpoint reports only area and perimeter so the search intent stays crisp and the contract stays two numbers plus the echoed side.
Input contract, response shape, and validation rules
Zero and negative side lengths also fail, because a geometric edge length must be strictly greater than zero—there is no meaningful area or perimeter for a collapsed or inverted hexagon. Example: side equals two yields perimeter exactly twelve and area equal to six times the square root of three, about ten point three nine two three. Side equals one yields perimeter six and area equal to three square-root-of-three over two, about two point five nine eight one. Units are not converted: if you pass centimetres you get square centimetres for area and centimetres for perimeter; if you pass inches you get square inches and inches. POST a JSON body with one required field: side, a finite positive number giving the edge length of the regular hexagon. The value may arrive as a JSON number or as a numeric string; empty strings, missing fields, non-numeric text, NaN, and Infinity fail with invalid_input naming the field. On success the body echoes side, returns area and perimeter rounded to twelve decimal places for stable goldens across runtimes, and includes a formula string restating A = (3√3/2)·s² and P = 6s. Pair the response with your own drawing code if you need vertices, an apothem, or a circumradius; this endpoint derives area and perimeter only and does not emit coordinates, inradii, or images. Failed validation does not consume prepaid balance; successful parse-tier calls use the published $0.002 base price.
Integration use cases
Classroom and exam checks
Let students enter side length s and verify A=(3√3/2)·s² and P=6s against six-equilateral-triangle methods without calculator slip-ups.
Technical questions
How do I find the area and perimeter of a regular hexagon from the side length?
Send a finite positive number side. The API returns area A = (3√3/2)·s² and perimeter P = 6s, plus a short formula string.
What does the hexagon calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.