Migration balancing makes sure that all parts of population change add up. The system adjusts in-migration and out-migration so that all parts add up.
The equation is:
Out-Migration = Population(t−1) + Births − Deaths + In-Migration − Population(t)
This keeps each year in balance. Every person is counted once.