This article is from the Calendars FAQ, by Claus Tondering claus@tondering.dk with numerous contributions by others.
Since the Persian year is defined by the astronomical vernal equinox,
the answer is simply: Leap years are years in which there are 366 days
between two Persian new year's days.
However, basing the Persian calendar purely on an astronomical
observation of the vernal equinox is rejected by many, and a few
mathematical rules for determining the length of the year have been
suggested.
The most popular (and complex) of these is probably the following:
The calendar is divided into periods of 2820 years. These periods are
then divided into 88 cycles whose lengths follow this pattern:
29, 33, 33, 33, 29, 33, 33, 33, 29, 33, 33, 33, ...
This gives 2816 years. The total of 2820 years is achieved by
extending the last cycle by 4 years (for a total of 37 years).
If you number the years within each cycle starting with 0, then leap
years are the years that are divisible by 4, except that the year 0 is
not a leap year.
So within, say, a 29 year cycle, this is the leap year pattern:
Year Year Year Year 0 Ordinary 8 Leap 16 Leap 24 Leap 1 Ordinary 9 Ordinary 17 Ordinary 25 Ordinary 2 Ordinary 10 Ordinary 18 Ordinary 26 Ordinary 3 Ordinary 11 Ordinary 19 Ordinary 27 Ordinary 4 Leap 12 Leap 20 Leap 28 Leap 5 Ordinary 13 Ordinary 21 Ordinary 6 Ordinary 14 Ordinary 22 Ordinary 7 Ordinary 15 Ordinary 23 Ordinary
 
Continue to: