No, I got the raw upkeeps from maually adding all the upkeep costs for all of our systems.
I got the upkeep savings from adding up the upkeep costs of all our fortified systems (not canceled). No systems were undermined. The only change to the raw upkeep would be savings from fortifications. Cancelled systems would not change the raw upkeep value.
There was no adding twice anywhere.
RAW profits (manually summated) - RAW upkeeps (summated ALL upkeeps from ALL control systems except Syntheng because it was in turmoil) - overhead (computed with the equation) + fortified savings (summating upkeep of all systems which were fortified)
You clearly counted wrong, because your values don't agree with the in-game values and you don't have any reasonable mechanism to get from one to the other.
Look, I'll try to lay this out by system states.
Current state, State 1, as represented on the in-game balance sheet:
Turmoil:
Syntheng: TRUE (+62 Overhead, +30 Upkeep) (note: here we're also helping you by assuming Syntheng's upkeep is bugged, and you're paying it when in turmoil you shouldn't)
Kwatsu: TRUE ( -149 Income, -50 Upkeep)
Samba: TRUE (-132 Income, -46 Upkeep)
Expansions: TRUE (+100 Upkeep, +186 Overhead, +312 Income)
Current Balance, as displayed in-game:
4458 Income: This includes +312 for the expansions.
1029 Upkeep: This includes everything above, and all fortification savings. According to your table, this should be 1149-574=575. You've granted yourself roughly 500 "ghost CC".
3788 Overhead: This includes everything listed above.
Now, let's move to the state where you claim you had a positive CC balance, State 2. Let's list the relevant values for that state:
Turmoil:
Syntheng: FALSE
Kwatsu: FALSE
Samba: FALSE
Expansions: TRUE
Since in the previous state all values were TRUE, staying TRUE won't change anything (pardon the all caps, it's a Boolean thing). For each variable that becomes FALSE, we will subtract its relevant values (remembering the rule about double-negatives).
Income: 4458+149+132=4739
Upkeep: 1029+50+46-30=1095(again, you'll notice it's a far cry from the 575 you claimed to have at this point: in fact it went up, because of how Turmoil works)
Overhead: 3788-62=3726
So now, we have reached the state where you claim you should have a positive income. Syntheng is gone, Kwatsu and Samba are giving you income, all your expansions are giving you income. This is the highest your CC balance can possibly be without divine intervention. Your CC balance is:
+4739
-1095
-3726
_____
-82
(if Syntheng's upkeep is not bugged and State 1 already correctly excludes its upkeep as a proper Turmoil system, that will result in not needing to remove that upkeep from State 2 and it would put you at -112)