# Super Co-Contributions

The Australian government has a scheme where they will contribute up to \$1.50 for every dollar you save in superannunation.

The maximum amount they will match for your income goes down for 5c after every \$1 over \$28,000, and is capped at \$1500. The official calculator annoyingly doesn't tell you the minimum amount you should invest to get the maximum return (the brochure shows it with less granularity). It's hardly rocket science but the below Python program should do that for you.

```#figure out super co-contributions
import sys

def best_contribution(income):
greatest_cocontribution = 1500 - ((income - 28000) * 0.05)
print "\$%7d | %5d | %5d " % (income,
greatest_cocontribution / 1.5,
greatest_cocontribution)

print " %7s | %5s | %5s " % ("income", "you", "govt")
print "---------+-------+-------"

if __name__ == '__main__':
try:
if sys.argv[1] == 'all':
incomes = range(28000, 59000, 1000)
for i in incomes:
best_contribution(int(i))
else:
income = int(sys.argv[1])
if (income < 28000 or income > 58000):
print "income out of range"
sys.exit(0)
best_contribution(income)
except:
print "super.py [income|all]"
```

As an idea, here is the output for \$1000 increments

```  income |   you |  govt
---------+-------+-------
\$  28000 |  1000 |  1500
\$  29000 |   966 |  1450
\$  30000 |   933 |  1400
\$  31000 |   900 |  1350
\$  32000 |   866 |  1300
\$  33000 |   833 |  1250
\$  34000 |   800 |  1200
\$  35000 |   766 |  1150
\$  36000 |   733 |  1100
\$  37000 |   700 |  1050
\$  38000 |   666 |  1000
\$  39000 |   633 |   950
\$  40000 |   600 |   900
\$  41000 |   566 |   850
\$  42000 |   533 |   800
\$  43000 |   500 |   750
\$  44000 |   466 |   700
\$  45000 |   433 |   650
\$  46000 |   400 |   600
\$  47000 |   366 |   550
\$  48000 |   333 |   500
\$  49000 |   300 |   450
\$  50000 |   266 |   400
\$  51000 |   233 |   350
\$  52000 |   200 |   300
\$  53000 |   166 |   250
\$  54000 |   133 |   200
\$  55000 |   100 |   150
\$  56000 |    66 |   100
\$  57000 |    33 |    50
\$  58000 |     0 |     0
```