What this calculator does
A half stadium is a stadium cut in half along its long axis, the line through the centres of its two end semicircles. It is a rectangle of length a and height r with a quarter disc of radius r attached to each end: a flat base of length a + 2r, a flat top of length a, and two quarter-circle arcs joining them.
Derivation of the formulas
Area:
$$ A = a r + \frac{\pi r^2}{2} $$
Perimeter:
$$ P = 2a + 2r + \pi r $$
The full stadium with straight length a and radius r has area \(2ar + \pi r^2\) and is symmetric about its long axis, so each half has \(ar + \tfrac{\pi}{2}r^2\). The boundary of the half is the cut along the axis (length \(a + 2r\)), the straight top (length a) and two quarter arcs of length \(\tfrac{\pi}{2}r\) each. From the area and a, r solves the quadratic \(\tfrac{\pi}{2}r^2 + ar - A = 0\), whose positive root is \(r = \dfrac{2A}{a + \sqrt{a^2 + 2\pi A} }\).
Solving from what you know
Choose what you know: Straight length a and radius r; Radius r and area A; Radius r and perimeter P; Straight length a and area A. The calculator first solves for the sizes that define the shape and then computes every other value from the formulas above. Each length is accepted from 0.000001 to 1,000,000,000 (a length the shape allows to shrink away, such as an inner radius, may also be 0), and each area from 0.000000000001 to 1,000,000,000,000,000,000; anything outside is refused with a sentence that names the range. A combination that cannot form the shape is refused with a sentence that says why; a limit that is still a real shape, such as an inner radius of 0, is answered.
Worked example
With the defaults a = 8 and r = 3: A = 24 + 4.5π ≈ 38.137167, P = 16 + 6 + 3π ≈ 31.424778.
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable. They are shown with up to 6 decimal places; a value below 0.000001 or of 10¹⁵ and more is shown as its plain 12-digit number instead. The unit you pick is a label: lengths are shown in that unit and areas in its square.
Frequently asked questions
What if the straight length is 0?
The two quarter discs meet and the shape is a half disc of radius r: A = πr²/2, P = 2r + πr.
How is this different from a stadium cut across?
Cutting a stadium across its middle gives a rectangle with one semicircular end. This calculator uses the cut along the long axis.
How accurate are the results?
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
Reference
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd edition, CRC Press, 2018