How does heavenly stems and earthly branches calculate the year?

The serial numbers corresponding to 10 and 12 are as follows:

Ten-day stems: 1 A, 2 B, 3 C, 4 D, 5 E, 6 F, 7 G, 8 X, 9 N,10c;

Twelve earthly branches: 1, 2 ugly, 3 cloudy, 4 gross, 5 morning, 6 si, 7 noon, 8 Wei, 9 Shen, 10 you,1Xu, 12 sea.

To calculate the year of a year with heavenly stems and earthly branches, just remember one formula:

Heavenly stems in the required year = (AD year -3) ÷ 10 remainder.

Remainder of earthly branch in required year = (AD year -3) ÷ 12.

The remainder is equivalent to the serial number corresponding to heavenly stems and earthly branches mentioned above, and then we can use the remainder to find the corresponding order of heavenly stems and earthly branches.

Take 20 10 as an example to give you an example:

20 10 year's heavenly stems residue = (20 10-3) ÷ 10 is 7, corresponding to the order of heavenly stems above, then the heavenly stems in 20 10 year are Geng;

The residual of earthly branches in 20 10 year = (20 10-3) ÷ 12 is 3, which corresponds to the above earthly branches order, so the heavenly stems in 20 10 year are cloudy. So 20 10 corresponds to heavenly stems and earthly branches as Geng Yin.