ForHosting KIT · Math

Brahmagupta formula calculator

Enter the four sides of a quadrilateral inscribed in a circle and get its area: sides 3, 4, 3 and 4 give a semiperimeter of 7 and an area of 12. Sides that cannot close the outline are flagged. 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
A
3
B
4
C
3
D
4
You get
Perimeter
14
Semiperimeter
7
Area
12

Brahmagupta's formula is the classic closed-form way to find the area of a cyclic quadrilateral when you know all four side lengths and none of the angles or diagonals: a surveyor has paced the four edges of a cyclic lot; a student is given four consecutive sides of a figure inscribed in a circle; a game or CAD pipeline needs floor area from four measured edges without constructing heights by hand. This Brahmagupta formula calculator checks the strict quadrilateral inequality so the outline can close, forms the semiperimeter as half the sum of the sides, and returns the positive square root of the product of each (semiperimeter minus side).

What Brahmagupta's formula is and how the numbers work

Brahmagupta's formula computes the area of a cyclic quadrilateral—a four-sided polygon whose vertices all lie on a single circle—from the four side lengths alone. Label the consecutive sides a, b, c, and d in order around the figure. First form the semiperimeter s equal to (a plus b plus c plus d) divided by two.

Then the area is the positive square root of (s minus a) times (s minus b) times (s minus c) times (s minus d). That product under the radical is zero or negative when the sides cannot form a non-degenerate closed quadrilateral, so a strict inequality is required: each side must be shorter than the sum of the other three (equivalently, each side must be strictly less than s). A classic sanity check is the square of side one: perimeter four, semiperimeter two, and area one.

A rectangle with consecutive sides three, four, three, four yields semiperimeter seven and area twelve, matching length times width. An isosceles trapezoid or any other cyclic outline with the same four lengths recovers the same Brahmagupta value—among all quadrilaterals with given side lengths, the cyclic one has maximum area, and Brahmagupta returns that maximum.

Every step is elementary arithmetic and one square root on four scalars, so there is no iteration, no sampling, no dependence on wall-clock time, and no need for angles, diagonals, or the circumradius in the input contract.

Surveying and plot takeoff from four measured edges

Turn paced or taped edge lengths of a cyclic lot or frame into floor or land area without constructing altitudes or measuring corner angles.

Game, CAD, and mesh area from four edge lengths

Validate a cyclic quad face or compute surface area when only the four consecutive edge lengths are known in the scene graph or mesh data.

What is Brahmagupta's formula?

Brahmagupta's formula finds the area of a cyclic quadrilateral from four side lengths a, b, c, and d. With semiperimeter s = (a+b+c+d)/2, the area is sqrt((s−a)(s−b)(s−c)(s−d)).

What is the quadrilateral inequality?

Each side must be strictly shorter than the sum of the other three. If any side is longer than or equal to that sum, the lengths cannot form a simple closed quadrilateral.

Why are sides that cannot close rejected instead of returning area zero?

When one side is at least the sum of the other three, no simple closed quadrilateral exists.

Does this need angles, diagonals, or coordinates?

No. Only the four consecutive side lengths of a cyclic quadrilateral are required. For non-cyclic figures with known vertices, use a shoelace (coordinate) quadrilateral area tool.

Is the Brahmagupta formula calculator free?

The browser tool is free and runs locally.

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/geom/cyclic-quadrilateral-area

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/geom/cyclic-quadrilateral-area \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":3,"b":4,"c":5,"d":6}'
{
  "a": 3,
  "b": 4,
  "c": 5,
  "d": 6
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.cyclic_quadrilateral_area",
  "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.

Results are deterministic JSON—no computer-algebra system, no random seeds, and the same pure solve function in the free browser tool and the prepaid API path—so homework checks, grading scripts, and production pipelines all see the same numbers every time.

What Brahmagupta's formula is and how the numbers work

When any of those fails, no simple closed quadrilateral exists and this tool returns invalid_input rather than a zero or imaginary area.

How to call the API and what comes back

Use it from geometry homework pipelines, construction takeoff scripts, game-level tooling, interview-prep sandboxes, land-area checks from paced edges of a cyclic plot, or any workflow that needs a reproducible cyclic-quadrilateral area without installing a computer-algebra package on every machine. Send a JSON body with four fields. Field a is the first positive side length; aliases side_a, ab, and side1 are accepted. Field b is the second positive side; aliases side_b, bc, and side2 map to the same meaning. Field c is the third positive side; aliases side_c, cd, and side3 are accepted. Field d is the fourth positive side; aliases side_d, da, and side4 are accepted. On success the response echoes a, b, c, and d, adds perimeter, semiperimeter, area, method set to brahmagupta, and a short formula string documenting the closed forms for s and the area radical. Failed validation—missing a required field, a non-finite number, a non-positive side, or a quartet that breaks the strict quadrilateral inequality—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. Pair this endpoint with the Ptolemy diagonal-product capability when you also need the product of the diagonals from the same four sides, and with the general shoelace quadrilateral area tool when you have vertex coordinates instead of side lengths alone.

Practical tips, limits, and related searches

When teaching, prefer paired examples: a unit square for area one; a three-four-three-four rectangle for area twelve; and one-one-one-ten to demonstrate the hard rejection path that protects callers from sides that cannot close. Prefer Brahmagupta when you measured or were given all four edges of a cyclic outline and have no reliable height or diagonal. Round-trip checks are easy: after solving, confirm that perimeter equals a plus b plus c plus d, that semiperimeter is half that, and that area squared equals the product of the four (s minus side) factors within floating tolerance. Related but different intents—Ptolemy diagonal product, Heron triangle area, or coordinate shoelace—belong on their own landings rather than overloading this cyclic-area page. Keep side lengths finite and positive so intermediate products stay representable in IEEE double precision on the Worker and in the browser. Units are whatever you pass—metres, feet, or game units—as long as all four sides share the same unit; the API does not convert units for you. Because the formula only needs sides, students can recompute s and the four factors by hand for small integers and match the API line by line. This landing targets people searching for a Brahmagupta formula calculator or a cyclic quadrilateral area from four sides tool; it is not a general non-cyclic quadrilateral area solver—use shoelace from coordinates when the figure is not cyclic, and use Heron's formula when you only have a triangle. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type impossible outlines while learning the contract.

Homework and exam checks for cyclic quadrilateral area

Give students four consecutive side lengths of a cyclic quadrilateral; compare their hand-computed semiperimeter and Brahmagupta area against a deterministic API or free browser result.

Read the full KIT documentation →