Equilateral triangle calculator
An equilateral triangle with a side of 2 has a height and an area of about 1.732051 and a perimeter of 6. Give the side, the area or the height and also get the radii of the circles around and inside it. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Side length
- 2
- Height
- 1.732051
- Area
- 1.732051
- Perimeter
- 6
- Circumradius
- 1.154701
Provide exactly one of side, area, or height for an equilateral triangle and receive all six metrics — side, height, area, perimeter, circumradius, and inradius — rounded to your chosen decimals.
One measurement fixes the whole triangle
An equilateral triangle has three equal sides, so a single measurement decides everything else. Give the side, the area or the height and the calculator first recovers the side length, then works out six figures from it: side, height, area, perimeter, the radius of the circle through the corners and the radius of the circle inside. With a side of 2, the height and the area are both about 1.732051, the perimeter is 6, the outer radius about 1.154701 and the inner one about 0.57735. Because every figure comes from the same side, they always describe one consistent triangle.
The formulas in plain words, and where people slip
The height is the side times √3 divided by 2, and the area is the side squared times √3 divided by 4. The perimeter is three sides. The outer radius is the side divided by √3 and is always exactly twice the inner radius. Working backwards from an area means dividing four times the area by √3 and taking the square root; from a height, multiply by 2 and divide by √3. A common slip is rounding one result and using it to compute the next: here each figure is rounded separately from its exact value, to the decimals you choose, so errors do not pile up.
One input, six metrics
Supply exactly one of side, area, or height; providing zero or more than one of them is rejected, because an equilateral triangle is fully determined by any one of these. Each supplied value must be a positive number. The response always reports six fields computed from the canonical side length s: side, height, area, perimeter, circumradius, and inradius.
Whichever field you give, the tool first recovers s and then derives every other quantity from it, so the outputs always describe one real, mutually consistent triangle rather than an over-determined guess.
What you can do with it
Fabrication and CAD
Convert a target area or height into the exact side, perimeter, and inscribed/circumscribed radii before cutting material or placing a part.
Geometry teaching
Show how one measurement fixes an equilateral triangle, listing all six metrics with adjustable decimals for step-by-step work.
Layout and graphics
Compute circumradius and inradius to place equilateral shapes on a grid or generate accurate SVG paths.
FAQ
Which input do I give?
Exactly one of side, area, or height, as a positive number.
What does it return?
Six fields derived from the side length: side, height, area, perimeter, circumradius, and inradius.
Can I control rounding?
Yes. The optional decimals field (integer 0–10, default 6) sets half-up rounding applied once to each output.
How do I find the side of an equilateral triangle from its height?
Multiply the height by 2 and divide by √3. The calculator does this first and then derives the area, perimeter and both radii from that side, so all six figures describe the same triangle.
How are the circumradius and the inradius related?
The circumradius is always exactly twice the inradius. For a side of 2 they are about 1.154701 and 0.57735: the first is the side divided by √3, the second the side divided by twice √3.
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/equilateral-triangle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"side":2}'const res = await fetch("https://api.kit.forhosting.com/math/equilateral-triangle", {
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/equilateral-triangle",
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/equilateral-triangle", 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/equilateral-triangle", 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.equilateral_triangle",
"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
One input, six metrics
This endpoint solves an equilateral triangle from a single known measurement and returns its full set of metrics. For the example side=2 the result is height≈1.732051, area≈1.732051, perimeter=6, circumradius≈1.154701, and inradius≈0.57735.
The exact formulas
All paths share one constant, √3, computed a single time, so the forward and inverse directions agree to full double precision. Note that height and area happen to share the same numeric value only when s equals 2, as in the worked example; for any other side they diverge. The geometry uses the closed forms for an equilateral triangle of side s: height h = (√3/2)·s, area A = (√3/4)·s², perimeter P = 3·s, circumradius R = s/√3, and inradius r = s/(2√3), so R is always exactly twice r. When you pass area instead of side, s is inverted as s = √(4A/√3); when you pass height, it is inverted as s = 2h/√3. Because everything flows from s, the returned perimeter for a rational side stays exact — for instance 6 when s = 2.
Rounding, decimals and guards
Each of the six outputs is rounded independently from its own exact intermediate, never from another already-rounded field, so rounding error cannot compound from circumradius into inradius. Results are rounded with an explicit half-up rule applied once to each raw IEEE value: the helper multiplies by 10^decimals, adds 0.5, floors, and divides back, preserving sign. The decimals field is optional, defaults to 6, and must be an integer between 0 and 10; out-of-range values raise invalid_input. Validation runs first: the body must be an object, exactly one of side/area/height must be present, each must be a positive number, and a non-finite computed area is rejected as a typed error.
Technical questions
Which formulas are used?
height = (√3/2)·s, area = (√3/4)·s², perimeter = 3s, circumradius = s/√3, inradius = s/(2√3); area and height inputs are inverted back to s first.
Is it free?
Yes in the browser as a tier A widget. The API costs $0.002 per successful call; failed tasks are not charged.