Lune area calculator
Two circles of radii 5 and 4 with centers 5 apart give a lune of 20.7940112152 square units, the sum of the two circular segments on either side of the common chord. Enter both radii and the distance to get it. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Radius a
- 5
- Radius b
- 4
- Distance
- 5
- Angle a rad
- 1.6460673843
- Angle b rad
- 2.3185589615
- Segment a
- 8.1112364131
- Segment b
- 12.6827748021
Given the two radii and the distance between centers, the lune area is fixed by a classical closed-form identity: it equals the sum of the two circular segments cut off by that chord. Students meet lunes in plane-geometry history (Hippocrates of Chios) and in homework that asks for the area between two arcs; designers, survey assistants, and makers need the same number when two circular cuts or overlapping disks leave a crescent cut-out.
What a circular lune is and why two radii plus distance fix its area
In Euclidean plane geometry two circles of radii a and b whose centers are a finite distance d apart may be disjoint, nested without crossing, tangent, or properly intersecting at two points. Only the last case produces a common chord and a pair of arcs between those points. The region bounded by those two arcs is a lune: a concave-convex crescent whose area is completely determined by a, b, and d.
At each center the chord subtends a full central angle obtained from the law of cosines: the half-angle at the first center is arccos of (d squared plus a squared minus b squared) over (two d a), and likewise for the second radius. Doubling those half-angles yields the full central angles θ and φ. Each circular segment area is then (r squared over two) times (angle in radians minus sine of that angle).
Adding the two segment areas recovers the lune area—the classical sum-of-segments identity. Search intent clusters around phrases such as lune area calculator, circular lune area, area of a lune from two radii, and crescent area of intersecting circles. People want a numeric result they can check against a worksheet key, a CNC cut list, or a CAD note, not only a geometric argument that the figure is determined.
What you can do with it
Homework and exam circular-lune drills
Students and graders confirm lune area and both segment pieces for classic two-radii-and-distance data, including rejection when the circles do not properly overlap.
FAQ
Which formula does the calculator use?
The lune area is the sum of the two circular segments cut off by the common chord.
Is the lune area calculator free?
The browser tool runs free on your device.
How is a lune different from a circular segment?
A segment is the area between one chord and one arc of a single circle. A lune is the crescent bounded by two arcs from two circles; its area is the sum of the two segments that share the common chord.
What if my two circles do not overlap?
The circles must cross at two distinct points: the distance must be greater than the difference of the radii and less than their sum. Circles that are apart, nested or only touching are rejected with a message.
What does the result include besides the lune area?
It also gives each circular segment and each central angle in radians. With radii 5 and 4 at distance 5, the segments are 8.1112364131 and 12.6827748021, so you can check the sum on a worksheet.
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/lune-area \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"radius_a":5,"radius_b":4,"distance":5}'const res = await fetch("https://api.kit.forhosting.com/geom/lune-area", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"radius_a": 5,
"radius_b": 4,
"distance": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/lune-area",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"radius_a": 5,
"radius_b": 4,
"distance": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/lune-area", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"radius_a":5,"radius_b":4,"distance":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"radius_a":5,"radius_b":4,"distance":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/lune-area", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"radius_a": 5,
"radius_b": 4,
"distance": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.lune_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.
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
A circular lune is the crescent-shaped region bounded by two circular arcs that share the same pair of endpoints—the common chord of two intersecting circles. This capacity accepts two positive radii and a positive center distance, requires the circles to properly overlap at two distinct points, rejects non-overlapping configurations with a clear invalid_input error, and returns the lune area together with both segment areas and both central angles as structured JSON.
What a circular lune is and why two radii plus distance fix its area
Delivering lune_area, segment_a, segment_b, angle_a_rad, and angle_b_rad as JSON makes the result easy to paste into notes, diff in automated tests, or feed into a larger pipeline without reimplementing inverse cosine and segment arithmetic in every language you teach or deploy.
How this calculator validates input and applies the sum-of-segments formula
Each must be a positive finite number large enough for stable floating-point evaluation and below a generous upper bound so extreme inputs cannot overflow intermediate products. The circles must properly overlap: the distance must be strictly greater than the absolute difference of the radii and strictly less than their sum. Edge cases are explicit: missing fields, non-numeric strings, zero or negative lengths, and non-overlapping circles all fail before any area is returned. Send a JSON body with three required numeric fields: radius_a, radius_b, and distance. Any configuration that is disjoint, internally nested without crossing, or only tangent fails immediately with invalid_input and a message that names the overlap rule, so callers never receive a silent zero or a NaN from an out-of-domain arccos. Results are rounded to a stable decimal precision so the same input always yields the same JSON.
Practical use, limits, pricing, and delivery channels
Use the browser tool when you want an immediate lune area while checking homework, sizing a crescent cut-out, verifying an overlapping-disk diagram, or confirming a shop drawing without installing a computer-algebra system. Length units are whatever you already use for the figure, and response lengths and areas share that same unit system—if radii are in centimetres the lune area is in square centimetres. There is no language model, no external geometry service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials. Each successful request is one billable item at $0.002; failed validation does not consume balance. Results are fully deterministic: the same radii and distance always yield the same angles, segments, and lune_area fields. Wire the endpoint into lune-area drills, contest answer checkers, overlapping-circle worksheets, or floating preprocessing steps where you already prefer explicit domain errors over opaque black-box widgets that cannot show why a pair of circles that only touch is rejected. Keep both radii positive, keep the center distance inside the open overlap interval, pin the rounded lune_area in tests, and you get reproducible crescent areas for homework, CAD checks, and edge workers without standing up a geometry library of your own.
Integration use cases
Deterministic fixtures for geometry tests
Pipelines that seed unit tests or interactive lune demos can call a pure sum-of-segments oracle instead of reimplementing inverse cosine and segment area in every language.
Crescent cut-out and overlapping-disk checks
Field or shop notes that record two radii and a center distance recover lune area plus both central angles as structured JSON for reports or lightweight CAD helpers.
Technical questions
How do I compute circular lune area with this API?
Send a JSON body with radius_a, radius_b, and distance to geom.lune_area. The response returns lune_area, segment_a, segment_b, angle_a_rad, and angle_b_rad.
What happens if the circles do not overlap?
The request fails with invalid_input. Circles must satisfy |radius_a − radius_b| < distance < radius_a + radius_b; disjoint, nested-without-crossing, and tangent cases are rejected and those calls are not charged.