Assumptions
- A: The empire's number of owned systems is a multiple of 10 (10, 20, 30, and so on)
- B: The Empire is already at starbase capacity
- C: The Empire has no flat increases to starbase capacity outside of the base +3
- D: The extra upkeep of an upgraded starbase is in the range of 1 (starport, no modules or buildings) to 18 (citadel, max modules, 4 buildings of 2 energy each)
- E: The additional upkeep incurred from being over capacity is additive with respect to other upkeep modifiers (eg. the one from expansion tree)
It follows that the empire has a total of 10n starbases, of which n+3 are upgraded, where n is a positive nonzero integer.
With a base upkeep of 1 per starbase, the empire's energy upkeep before upgrade (EUi) is then the sum of its systems plus the additional upkeep (AU) from starbase upgrades:
EUi = 10n + (n+3)*AU
Upgrading one starbase to go above capacity then results in a total of 10n starbases of which n+4 are upgraded.
The empire's upkeep after going above capacity (EUf) is then:
EUf = (10n + (n+4)*AU))*5/4
The extra upkeep incurred by upgrading a starbase is then EUf - EUi, which reduces to
EUf - EUi = (10/4)n + n*AU/4 + 2AU
With that out of the way, it's easier to do some analysis.
Firstly, note that the extra upkeep increases as n grows larger, meaning a larger empire will pay more for going over cap.
What this means is that the trade value collected from the extra base needs to also be larger for this overcap thing to pay off.
Secondly, note also that AU increases the energy upkeep - remembering that AU is basically the average cost of your starbase upgrades, meaning a highly developed empire will pay more for going over cap.
Take an example, an empire with 50 systems and an AU of 6 (meaning all upgraded bases are starholds with 4 modules).
Plugging n=5, AU=6 into the above expression:
EUf - EUi = (10/4)*5 + 5*6/4 + 2*6 = 32
In this case, upgrading one starbase to the same level as the others (and thus going 1 over cap) would increase the nation's total energy upkeep by 32.
I'll leave it to the readers to make their own conclusions regarding when it's worthwhile to go over cap - try plugging in values from your own games.