Skip to content
ihateDesmos

The heart curve: equations for a heart shape

There is no single “heart equation”, but there are several beautiful ones. The most famous is the sextic curve (x² + y² − 1)³ = x²y³, and the smoothest is a parametric curve built from sines and cosines. Each one below can be typed straight into the calculator.

−2−112−110
Open in calculator
The implicit heart (x² + y² − 1)³ = x²y³, drawn exactly. Its cusp at the bottom and dimple at the top come straight from the algebra.

Equations to type

Implicit heart (a sextic curve)
(x^2 + y^2 - 1)^3 = x^2 y^3
Open
Parametric heart curve
(16sin(t)^3/8, (13cos(t) - 5cos(2t) - 2cos(3t) - cos(4t))/8)
Open
Two arcs on a circle
x^2 + (y - abs(x)^(2/3))^2 = 1
Open
Polar cardioid, turned upright
r = 1 - sin(theta)
Open

At a glance

Implicit form
(x² + y² − 1)³ = x²y³, degree 6
Parametric form
x = 16 sin³t, y = 13 cos t − 5 cos 2t − 2 cos 3t − cos 4t
Symmetry
Every version is symmetric about the y-axis

The implicit heart

(x² + y² − 1)³ = x²y³ starts from the unit circle, x² + y² = 1, and bends it. Where y is positive, the right side is positive, so x² + y² must be slightly more than 1: the top bulges out into two lobes. Where y is negative, x² + y² must be less than 1 and the bottom is pulled in, meeting itself in a cusp at (0, −1).

The curve is easy to type but hard for many graphers, because near the cusp the left side barely changes sign. This calculator’s certified mode proves which pixels the curve passes through, so the point of the heart is drawn sharp.

The parametric heart curve

The smoothest heart is x = 16 sin³t, y = 13 cos t − 5 cos 2t − 2 cos 3t − cos 4t for 0 ≤ t ≤ 2π. The sin³ term gives the width, and the sum of cosines is a short Fourier series that sculpts the dip at the top and the point at the bottom. Dividing both by 8, as in the equation above, makes it about the same size as the others.

Try removing the cos 4t term, or changing 5 to 4: each coefficient controls one feature of the outline.

−2−112−110
Open in calculator
The full parametric heart (pink) and the same curve with only the first two cosine terms (dashed).

The circle-and-arcs heart and the cardioid

x² + (y − |x|^(2/3))² = 1 is a circle whose centre rides up and down with |x|^(2/3), which pinches the top into a dimple. The polar cardioid r = 1 − sin θ is the oldest of the four: a curve traced by a point on a circle rolling around another circle of the same size. It looks more like an apple than a heart, but it is where the name comes from (cardia is Greek for heart).

Frequently asked questions

What is the equation for a heart shape?
A popular one is (x² + y² − 1)³ = x²y³. Another is the parametric curve x = 16 sin³t, y = 13 cos t − 5 cos 2t − 2 cos 3t − cos 4t.
How do I graph a heart in the calculator?
Type (x^2 + y^2 - 1)^3 = x^2 y^3 exactly as written. There is no need to solve for y.
Is a cardioid a heart?
The cardioid is named after the heart, but its shape is closer to an apple. Turning it upright with r = 1 − sin θ makes the resemblance clearer.
Can I fill the heart in?
Yes: type the implicit version as an inequality, (x^2 + y^2 - 1)^3 < x^2 y^3, to shade the inside.

More curves

Make it your own

Every equation on this page opens in the calculator, where you can add sliders and watch the curve change.

Open the calculator