I don't have CTP2, but I did some number crunching in CTP. Assuming that CTP2 works kinda like CTP (which seems to be a fair assumption at this point), there are a number of factors you need to take into account.First, you need to get an accurate count of the resources you're taking in from tiles. In CTP this was simple, because the numbers were printed on the screen for you. In CTP2 it sounds like this is calculated based on the number of workers and the sum of the resources on tiles in the various rings, by some formula which Activision has not yet fully revealed.
Second, add in the resources produced by specialists and buildings. In CTP, for example, a City Clock gives you 1 gold per population point. Suppose you have a size-10 city; a City Clock gives you 10 gold, which works exactly like 10 gold from a mine, or 10 gold from a trade route (i.e., it's multiplied later on). The merchant specialists acted the same way -- they gave you 10 gold, which got multiplied by marketplace/bank/etc.
Third, apply all the multipliers. The government type has multipliers for gold, food and production. Buildings can give you multipliers (e.g., +50% gold) -- but these probably changed from CTP so I won't try to guess what they are in CTP2.
Fourth, look for crime, or corruption, or waste, or whatever it's called in CTP2. This is usually a small amount in the early game, but it's measurable. Subtract the crime losses from the total.
Fifth and finally, look for global maintenance costs. If military units still cost production (minerals) to maintain, and if they're still supported by the empire as a whole instead of by individual cities, then their cost has to be split up somehow. (I never did enough number crunching to figure out how CTP split up the military support costs.) You will most likely lose some production from each city for military support.
Then there's special stuff like enemy cities converted by clerics and giving you gold, and corporate branches creating franchises that leech production. And of course this works in reverse -- some of your production/gold may be leeched by a foreign power. I didn't quite figure out how that income is tabulated, either, so you should probably ignore it until you figure out the rest of the formulas.
Of course, CTP2 may have added some more factors. These were all the factors in CTP that I know of.
Hope this helps.