From https://www.galciv.wikia.com/wiki/Tax.
Income = constant * sqrt(population_in_billions) * tax_rate * (1 + (sum from buildings on planet)) * (1 + (sum from racial bonuses/maluses) )
Constant seems to be:
- 34.5 in Dread Lords
- 28.5 in Dark Avatar before ver. 1.6
- 24.0 in Dark Avatar after ver. 1.6, up to current 1.8
- 20.0 in DA and for planets over 25B pop
In this case "sum from buildings on planet" means the sum of the econ bonuses of econ buildings on the planet and bonuses include form of government bonuses plus all other civ wide bonuses (like econ resource mining) as indicated under the economics ability listed in your civ manager. Maluses (if this is really a word) are few and the only one I know is the penalty you get for keeping over 20K in your treasury.
Although I'm not sure knowing the precise formula is all that necessary, just make sure you really need that new building before you buy it. Sometimes folks upgrade to the newest building just because they researched the tech that enables it. Or sometimes they build another factory or research building just because the planet has empty space. Usually people intentionally stay away from techs like Industrial Sector because it's not particularly cost effective to even upgrade to them until late in the game.
Make sure that you both have the need for the extra building as well as the income to support *before* you build it. Sometime the best thing to build is nothing.
The point is if you can't afford to turn on all those factories or research buildings at the same time then clearly you have too many of them. In that case you might even consider destroying a building or two. It will reduce your maintenance costs and it will also drive home the lesson.