ForHosting KIT · Math

Spherical excess calculator

Enter the three angles of a spherical triangle and get its excess, area and share of the sphere: angles of 1.2, 1.1 and 1 radians on a sphere of radius 1 give an excess of 0.158407 rad, or 9.076072°. 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
1.2
B
1.1
C
1
Sphere radius (R)
1
You get
Spherical excess (radians)
0.158407
Spherical excess (degrees)
9.076072
Area
0.158407
Fraction of sphere surface
0.012606

Computes the spherical excess of a spherical triangle from its three interior angles A, B and C. Returns the excess in radians and degrees, the triangle's area on a sphere of radius R, and the fraction of the whole sphere it covers.

Girard's theorem: E = A + B + C − π

On a sphere the angles of a triangle sum to more than π radians, and the amount by which they exceed it is the spherical excess, E = A + B + C − π. This is Girard's theorem, and it is the core identity this capability evaluates. You pass the three interior angles A, B and C together with the sphere radius R.

Unlike a plane triangle, where the angles always total exactly π and carry no area information, the excess of a spherical triangle is directly proportional to how much surface it encloses, which is why a single subtraction captures the whole result.

Area and sphere fraction outputs

From the excess the tool derives two further quantities. The triangle's area on a sphere of radius R is area = R² · E, so the excess in radians is literally the area on a unit sphere. Both the radian excess and the degree excess (E·180/π) are returned so you can read the result in whichever unit suits you.

Every field is rounded half-up to the decimals you request, defaulting to six places.

Validation and the physical constraints it enforces

The inputs are validated against the geometry, not just their types. Crucially the excess must be strictly positive: if A + B + C does not exceed π the triangle is degenerate or planar and the tool rejects it with "exceso no positivo" rather than reporting a zero or negative area. These checks make every returned area physically meaningful.

Geodesy and mapping

Turn the measured angles of a survey triangle on the Earth's surface into its true area, correcting for the curvature that plane trigonometry ignores over long baselines.

GIS and spherical polygon area

Decompose a region into spherical triangles and sum their excess-derived areas to compute land, ocean or coverage areas on a globe of a chosen radius R.

Navigation and astronomy teaching

Illustrate Girard's theorem with reproducible numbers, showing how the angle sum's departure from π maps directly onto area and the fraction of the sphere enclosed.

What is spherical excess?

It is the amount by which a spherical triangle's interior angles exceed π radians: E = A + B + C − π, by Girard's theorem.

How is the area calculated?

area = R² · E, where E is the excess in radians.

Can I enter the angles in degrees?

Yes. Radians are the default, but you can switch to degrees and each angle is multiplied by π/180 before the excess is worked out. The excess itself always comes back in both radians and degrees.

Why is my spherical triangle rejected?

Each angle must lie strictly between 0 and π, that is between 0° and 180°, and the three must add up to more than π. Otherwise the triangle is flat or degenerate and has no positive area to report.

What share of the sphere does the triangle cover?

The excess divided by 4π, the solid angle of the whole sphere. Angles of 1.2, 1.1 and 1 radians cover 0.012606 of the surface whatever the radius, while the area itself grows with the square of the radius.

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/math/spherical-excess

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/math/spherical-excess \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"A":1.2,"B":1.1,"C":1,"R":1}'
{
  "A": 1.2,
  "B": 1.1,
  "C": 1,
  "R": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.spherical_excess",
  "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.

Girard's theorem: E = A + B + C − π

Angles may be given in radians (the default) or in degrees by setting angle_unit to "deg", in which case each is converted with x·π/180 before the excess is formed.

Area and sphere fraction outputs

It also reports sphere_fraction = E / (4π), the share of the total spherical surface (whose solid angle is 4π steradians) that the triangle covers. The shipped example uses A = 1.2, B = 1.1, C = 1 radians with R = 1 and returns excess 0.158407 rad, 9.076072°, area 0.158407 and sphere_fraction 0.012606.

Validation and the physical constraints it enforces

A, B and C must be finite numbers, and after any degree-to-radian conversion each must lie strictly between 0 and π; an angle of 0 or π or beyond does not bound a proper spherical triangle and returns a typed invalid_input error reading "ángulos fuera de rango". The radius R must be a positive finite number, angle_unit must be exactly "rad" or "deg", and decimals must be an integer from 0 to 10.

Can I enter angles in degrees?

Yes. Set angle_unit to "deg" and A, B and C are converted with x·π/180 before the excess is computed; the default unit is radians.

Why did I get an invalid_input error?

Each angle must be strictly between 0 and π after conversion, R must be positive, and the excess must be positive; otherwise the triangle is invalid.

Is it free and how do I automate it?

The tier A widget runs free in your browser; the deterministic API returns the same JSON for batch geodesy jobs from $0.002 per call.

Read the full KIT documentation →