What this calculator does
Calculate area and perimeter of a stadium shape: a rectangle capped by two semicircles.
How it works
The calculator evaluates area = 2rL + πr²; perimeter = 2L + 2πr. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
2-
?straightLength=Length of each straight sectionNumber · Required · Default: 20
-
?radius=Semicircle radiusNumber · Required · Default: 5
Outputs
4-
areaAreaNumber · Primary output
-
perimeterPerimeterNumber
-
overallLengthOverall lengthNumber
-
overallWidthOverall widthNumber
Inputs and results
The inputs are Length of each straight section, Semicircle radius. Results include Area, Perimeter, Overall length, Overall width.