Basically, the land that you will get from grabbing a target is multiplied by a few things
A) How close you are to the target's NW. The farther away, the less land. Goes both ways, whether you are attacking larger or smaller. Maximum gains at 100%. Tip: It is not a good idea attacking countries of similar size, because they can retal you.
B) Multiplied by your Mililitary Strat tech %.
C) Multiplied by any bonuses you have from government (eg Tyranny)
D) Multiplied by a number, that is calculated by how many times a country has been hit in the last 72 hours. Every hit adds DR, every hit done by target removes DR, only certain types of hits count towards DR, and whether the attack succeeded or failed, DR added depends on how much time has elapsed for each attack, and every attack's DR decays with a variable halflife dependent on how much units was oversent in the attack. Half life is generally 18 hours multiplied by the oversent factor. Exact formula here:
http://www.earthempires.com/...eturns-29694?t=1394780292 Once you calculated the DR, you can calculate the multiplier.
That's just calculating the attack's land gain, and nobody knows the formula for that. We only know the multipliers that affect it.
Ghost acres are then calculated based on the attack's land gain, and is further multiplied by
A) Ghost DR
B) Country-to-Country DR
C) Govt bonus
D) % of land that are built on the target's country
E) Ghost acres is capped by 1a per (your_land/20) units sent.
Your total land gained is then the attack's land + ghosts.