Squircle Calculator

Squircle Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

A=Γ(1/4)22πr2≈3.708149355r2,P=8r∫02−1/41+u6(1−u4)3/2du≈7.017698rA = \frac{\Gamma(1/4)^2}{2\sqrt{\pi} }\,r^2 \approx 3.708149355\,r^2,\; P = 8r\int_0^{2^{-1/4} }\sqrt{1 + \frac{u^6}{(1 - u^4)^{3/2} } }\,du \approx 7.017698\,r
Usage stats

Advertisement

Results

Area
92.703734
square units
Half-width r 5
Width (side to side) 10
Diagonal extent (corner to corner through the centre) 11.892071
Perimeter 35.08849

Report an error on this page

What this calculator does

A squircle is the shape between a square and a circle given by |x|⁴ + |y|⁴ = r⁴: the Lamé curve (superellipse) with exponent 4, the most common meaning of the word. r is half its width, the distance from the centre to the middle of a side; the sides look almost flat and the corners are smoothly rounded.

Derivation of the formulas

Area:

$$ A = \frac{\Gamma(1/4)^2}{2\sqrt{\pi} }\,r^2 \approx 3.708149355\,r^2 $$

Perimeter:

$$ P = 8r\int_0^{2^{-1/4} }\sqrt{1 + \frac{u^6}{(1 - u^4)^{3/2} } }\,du \approx 7.017698\,r $$

Width and diagonal extent:

$$ w = 2r,\quad d = 2^{5/4}\,r $$

In the first quadrant the curve is y = (r⁴ − x⁴)^(1/4), so the area is A = 4∫₀^r (r⁴ − x⁴)^(1/4) dx = 4r²∫₀¹ (1 − u⁴)^(1/4) du. Substituting w = u⁴ turns this into the Beta integral r²·B(1/4, 5/4) = r²·Γ(1/4)Γ(5/4)/Γ(3/2), and with Γ(5/4) = Γ(1/4)/4 and Γ(3/2) = √π/2 it becomes A = r²·Γ(1/4)²/(2√π) ≈ 3.708149 r², between the inscribed circle (πr² ≈ 3.141593 r²) and the square (4r²). For the perimeter, the curve is symmetric about the diagonal, so it is 8 times the arc from (r, 0) to the diagonal point (r/2^(1/4), r/2^(1/4)). On that arc x = (r⁴ − y⁴)^(1/4) and dx/dy = −y³/(r⁴ − y⁴)^(3/4), so the arc element is √(1 + y⁶/(r⁴ − y⁴)^(3/2)) dy; with u = y/r this gives the integral in the formula, which has no elementary closed form. The calculator evaluates it by Simpson's rule with 4,000 intervals on that smooth integrand, so P ≈ 7.017698 r. The diagonal point lies at distance √2·r/2^(1/4) from the centre, so the extent across the corners is 2^(5/4)·r.

Solving from what you know

Choose what you know: Half-width r (centre to the middle of a side); Width (side to side); Area; Perimeter. The calculator first finds the sizes that define the curve and then computes every other value from the formulas above. Each length is accepted from 0.000001 to 1,000,000,000, each area from 0.000000000001 to 1,000,000,000,000,000,000; anything outside is refused with a sentence that names the range.

Worked example

With the default r = 5: the squircle is 10 wide, its area is about 3.708149·25 ≈ 92.703734, its perimeter about 35.08849, and it measures about 11.892071 from corner to corner through the centre, compared with 14.142136 for the square of the same width.

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 squircle with half-width 5, full width 10, and area 92.703734.
For a half-width of 5, the squircle is 10 wide and has an area of approximately 92.703734 square units.

Frequently asked questions

How does a squircle compare with a square and a circle?

For the same width 2r, the circle has area πr² ≈ 3.14 r², the squircle about 3.71 r² and the square 4 r². The squircle keeps most of the square's area while having no sharp corners.

Is the app-icon shape a squircle?

Many rounded icons and buttons are close to it, but designers use several related curves (other exponents of the superellipse, or rounded rectangles with smooth corners). This calculator uses the exact curve |x|⁴ + |y|⁴ = 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.

Advertisement
The diagonal through the squircle is 11.892071, compared with 14.142136 across the enclosing square.
The squircle measures approximately 11.892071 from corner to corner through its center; the square of the same width measures approximately 14.142136.

References

J. Dennis Lawrence, A Catalog of Special Plane Curves, Dover Publications, 1972

D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd edition, CRC Press, 2018

Last updated: