Triangle semiperimeter calculator
Add the three sides and halve the total: for 3, 4 and 5 the perimeter is 12 and the semiperimeter 6. It is the first step of Heron's formula and a quick check that the sides were typed correctly. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 3
- B
- 4
- C
- 5
- Perimeter
- 12
- Semiperimeter
- 6
The semiperimeter of a triangle is half the sum of its three side lengths: s equals (a plus b plus c) divided by two. That single closed form appears whenever Heron's formula needs its first step, when inradius equals area over s, when a contest problem asks for the semiperimeter alone, and when a pipeline must normalize three edges into one scalar before area or inscribed-circle work.
What triangle semiperimeter means and why s equals (a+b+c)/2
The perimeter of a triangle is the total length of its boundary: side a plus side b plus side c. The semiperimeter is simply half of that perimeter, written s equals (a plus b plus c) divided by two. Half is not an arbitrary convention: classical formulas for area, inradius, and several triangle centers are stated most cleanly in terms of s rather than the full perimeter.
Heron's formula multiplies s by each (s minus side) under a square root; the inradius is area divided by s; many textbook identities for the circumradius and tangent lengths also introduce s first. Search intent clusters around phrases such as triangle semiperimeter calculator, find semiperimeter of a triangle, s equals a plus b plus c over two, and half perimeter of a triangle from three sides.
Learners want a number they can check against a homework key before they apply Heron by hand; engineers and game tools want the same number as a stable intermediate. Units are whatever you pass—metres, feet, or game units—as long as all three sides share the same unit; the engine does not convert units. Unlike area, which needs a radical or a height, the semiperimeter is pure linear algebra on three scalars, so it is an ideal first check that the three lengths were typed correctly before any heavier formula runs.
What you can do with it
Prep step for Heron, inradius, and textbook identities
Normalize three measured or given edges into semiperimeter s so downstream formulas (area, r = A/s, tangent lengths) share one stable intermediate.
LMS and contest auto-grading for SSS data
Mark semiperimeter items with a pure oracle that rejects negative sides and never invents floating noise beyond fixed decimal rounding.
FAQ
What is the semiperimeter of a triangle?
The semiperimeter s is half the perimeter: s = (a + b + c) / 2, where a, b, and c are the three side lengths.
What happens if a side is negative?
Euclidean side lengths must be non-negative; failed validation is not billed.
Does this enforce the triangle inequality?
No. This calculator returns s from three non-negative sides. For non-degenerate area with strict inequality checks, use a Heron area calculator.
Do I need angles or height?
No. Only the three side lengths a, b, and c are required. The formula is pure addition and division by two.
Is the triangle semiperimeter calculator free?
The browser tool is free and runs locally.
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/triangle-semiperimeter \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":3,"b":4,"c":5}'const res = await fetch("https://api.kit.forhosting.com/geom/triangle-semiperimeter", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 3,
"b": 4,
"c": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/triangle-semiperimeter",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 3,
"b": 4,
"c": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/triangle-semiperimeter", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":3,"b":4,"c":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":3,"b":4,"c":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/triangle-semiperimeter", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 3,
"b": 4,
"c": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.triangle_semiperimeter",
"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 triangle semiperimeter calculator accepts three finite non-negative side lengths, rejects any negative side with a clear invalid_input error, and returns the semiperimeter as structured JSON together with the perimeter, the echoed sides, and the formula string. The same pure function powers the free browser tool and the prepaid API path, so homework checks, grading scripts, and edge workers never disagree on a three-number half-sum, and no language model or external geometry service sits in the computation path.
What triangle semiperimeter means and why s equals (a+b+c)/2
Delivering a, b, c, perimeter, semiperimeter, and a short formula field as JSON makes the result easy to paste into notes, pin in automated tests, or feed into a larger geometry pipeline without reimplementing the half-sum in every language.
Input contract, validation, and how the engine applies the formula
Each must be a finite number; numeric strings that parse cleanly are accepted so form posts and spreadsheet exports stay convenient. Missing fields, empty strings, Infinity, and NaN also fail before any arithmetic runs. There is no unit conversion inside the capacity: if you send centimetres you get centimetres of semiperimeter. Failed validation is not billed; only a successful item consumes the published base price. POST a JSON body with three required fields: a, b, and c for the three side lengths. Aliases side_a, side1, side_b, side2, side_c, and side3 map to the same three inputs for classroom templates that already label sides that way. Negative values fail immediately with invalid_input naming the field, because a Euclidean side length cannot be less than zero—that is the hard contract of this calculator.
Practical uses, pricing, limits, and when to call related tools
Use the free browser tool when you want an immediate triangle semiperimeter while checking homework, preparing Heron's formula by hand, verifying inradius setup with r equals area over s, or confirming three measured edges before a construction takeoff. Limits are intentional: only three planar side lengths, no angles, no coordinates, no automatic triangle-inequality rejection, and no unit conversion tables. If you need area from three sides with strict inequality checks, choose Heron; if you need perimeter of a rectangle or a general polygon, choose those dedicated capabilities instead. Each successful request is one billable item at $0.002; invalid input does not consume balance. Pair this endpoint with a dedicated Heron area calculator when you also need area: the two landings answer different search intents—semiperimeter alone versus full SSS area—so keeping them focused improves SEO clarity and keeps each response small.
Integration use cases
Homework and exam semiperimeter drills
Give students three side lengths; compare their hand-computed s = (a+b+c)/2 against a deterministic API or free browser result before they apply Heron.