How Age Is Calculated
Age calculation seems simple — subtract the birth year from the current year — but the exact calculation in years, months, and days requires careful handling of varying month lengths and leap years.
The Algorithm
- Subtract birth year from target year to get years
- Subtract birth month from target month to get months
- Subtract birth day from target day to get days
- If days are negative, borrow from the previous month (using its correct number of days)
- If months are negative after borrowing, borrow from years (add 12 months, subtract 1 year)
Leap Years
A leap year occurs every 4 years, except for years divisible by 100 (unless also divisible by 400). So 2000 was a leap year, but 1900 was not. February has 29 days in a leap year instead of 28. This affects age calculations for anyone born on or around February 29.
Zodiac Signs
| Sign | Dates | Element |
|---|---|---|
| Aries | Mar 21 – Apr 19 | Fire |
| Taurus | Apr 20 – May 20 | Earth |
| Gemini | May 21 – Jun 20 | Air |
| Cancer | Jun 21 – Jul 22 | Water |
| Leo | Jul 23 – Aug 22 | Fire |
| Virgo | Aug 23 – Sep 22 | Earth |
| Libra | Sep 23 – Oct |