From calendar to chart
The stems and branches began as a calendar system. Using them to read a person's fate developed over centuries, with major texts attributed to the Tang and Song periods.
The solar terms
BaZi uses the solar calendar, not the lunar one. The year begins at Li Chun, around 4–5 February, which is why a January birth can belong to the previous year's pillar.
Modern practice
Today there are several schools with different rules for strength and useful elements. The common ground is the four pillars themselves, which is what this site calculates.
Put it into practice
Calculate your own chart and see the Day Master, four pillars and five-element balance.