Rounded Rectangle Calculator

Rounded Rectangle Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

A=ab−(4−π)r2,P=2(a+b)−8r+2πrA = ab - (4 - \pi)\, r^2,\; P = 2(a + b) - 8r + 2\pi r
Usage stats

Advertisement

Results

Area A
58.068583
square units
Length a10
Width b6
Corner radius r1.5
Perimeter P29.424778
Straight part of each long side7
Straight part of each short side3
Area cut off the four corners1.931417square units

Report an error on this page

What this calculator does

A rounded rectangle is an a × b rectangle whose four corners are replaced by quarter-circle arcs of radius r, each arc touching the two sides it joins. The corner radius can be anything from 0 (a sharp rectangle) up to half the shorter side (then the short sides are fully round and the shape is a stadium, or a circle if a = b).

Derivation of the formulas

Area:

$$ A = ab - (4 - \pi)\, r^2 $$

Perimeter:

$$ P = 2(a + b) - 8r + 2\pi r $$

Each corner of the rectangle is an r × r square. Rounding it keeps the quarter disc \(\tfrac{\pi}{4}r^2\) and drops the rest, \(r^2 - \tfrac{\pi}{4}r^2\); four corners lose \((4 - \pi)r^2\). On the boundary each corner swaps two straight pieces of length r for a quarter arc of length \(\tfrac{\pi}{2}r\), so the perimeter loses \(8r\) and gains \(2\pi r\). From the area or the perimeter with a and b known, these two lines are solved for r.

Solving from what you know

Choose what you know: Length a, width b and corner radius r; Length a, width b and area A; Length a, width b and perimeter P. 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 = 10, b = 6 and r = 1.5: A = 60 − (4 − π)·2.25 ≈ 58.068583, P = 32 − 12 + 3π ≈ 29.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.

Advertisement
A rounded rectangle with length 10, width 6 and corner radius 1.5, paired with its calculated area and perimeter.
For a length of 10, width of 6 and corner radius of 1.5, the area is approximately 58.068583 and the perimeter is approximately 29.424778.

Frequently asked questions

What is the largest corner radius?

Half the shorter side. At that radius the short sides become semicircles and the shape is a stadium.

Why does the calculator ask for the length and width in the area mode?

The area alone does not fix the shape: for a given a and b the area falls steadily as r grows, so a, b and A together give exactly one r.

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

Last updated: