What is a cash shape?
A cash shape is a disc of radius r with a square hole of side l cut out of its centre; the square and the circle share their centre. It is the outline of the traditional round coin with a square hole, called cash in English. The shape has the four mirror axes of the square and 90° rotational symmetry. The square fits inside the circle while its half diagonal l/√2 is not larger than r, that is while l is at most r·√2; at that bound the corners of the square touch the circle. The outer circle is measured by our circle area page.
How to use it
Choose whether you know the radius r or the diameter d, then type it and the side l of the square hole. The hole side can be at most r·√2: the side as you typed it, rounded to 12 significant digits, is compared with r·√2 rounded the same way; at exactly that value the corners touch the circle and the page answers with a note. A larger hole is refused with a sentence that says why. The length unit is only a label: lengths come out in that unit and areas in its square. Radius r, diameter d and hole side l must each be from 0.000001 to 1,000,000,000; a number may also be typed in exponent form such as 2.5e3. Anything else, including text, is refused with a sentence that says why, and so is a set of values that cannot form the shape.
Derivation of the formulas
The disc has area πr² and the square hole l², so the area of the cash shape is their difference. The boundary has two parts, the outer circle and the four sides of the hole, and both count in the perimeter:
$$ A = \pi r^{2} - l^{2}, \qquad P = 2\pi r + 4l, \qquad d = 2r $$
The corners of the square lie at distance l/√2 from the centre. They stay inside the circle while l/√2 ≤ r:
$$ l \le r\sqrt{2} $$
With the opening values r = 10 and l = 6: the disc has area 100π ≈ 314.159265, the hole 36, so A ≈ 278.159265 and P = 20π + 24 ≈ 86.831853.
Worked example
The page opens with radius r = 10, hole side l (side of the square hole) = 6. Then area A (the disc less the square hole) ≈ 278.159265; perimeter P (circle plus the four sides of the hole) ≈ 86.831853; disc area (without the hole) ≈ 314.159265; square hole area ≈ 36. Each value is shown rounded once, from the computed number, to six decimals or to 12 significant digits, whichever is fewer; a value of 10¹² and more is written as its 12 significant digits times a power of ten, such as 1.23456789012 × 10¹⁵, since a computed number holds no more digits than that; a value below 0.0000005 is shown as its plain 12-digit number instead.
Frequently asked questions
Why does the perimeter include the hole?
The perimeter is the total length of the boundary, and the edge of the hole is part of it. The outer circle alone is the circumference, which the page shows on its own row.
How large can the hole be?
Up to r·√2, when the four corners of the square touch the circle; the ring then still holds together between the corners.
Why does the unit not change the numbers?
The calculator does not convert between units. Every length is read in the unit you chose, so the unit only labels the results; areas come out in that unit squared.
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.
References
H. S. M. Coxeter, Introduction to Geometry, 2nd edition, Wiley, 1969
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd edition, CRC Press, 2018