Ecology (Advanced)  
The ecological damage formula is complex:
(1) For each base total the number of MinesSolar CollectorsFarms, Soil EnrichersRoadsMag TubesCondensers, Mirrors, and Boreholes. Items
in squares which are actually being worked count double.
(2) Add an extra +8 for each Borehole, +6 for each Mirror, and +4 for each  Condenser.
(3) Subract 1 for each Forest.
(4) Halve if base has Tree Farm, and Eliminate if also has Hybrid Forest.
(5) Divide this value by 8, and reduce by up to 16 plus # of previous damages. Set this number aside.
(6) Take the number of minerals produced this turn (but not from Orbit)
(7) If result from 5 was reduced by less than 16+#, reduce result 6 by remaining amount.
(8) Divide minerals by 1 plus # of Centauri PreserveTemple of Planet, Nanoreplicator.
(9) Sum the values of (5) and (8), and add +5 for each major atrocity.
(10) If Alpha Prime is at perihelion (20 years out of every 80), double
your value.

Ecology% = (ValueFromStep10) * Difficulty * Technologies * (3-PLANET) * LIFE / 300

Difficulty = Normally 3, but 5 on two highest two difficulty levels.
Technologies = Number of technologies discovered
PLANET = Social Engineering PLANET value
LIFE = Native life level (1-3) from Custom Start