You need to use this statement:

where:
P- the amount of initial capital
Fn - final capital after n-years
r- annual effective interest rate
n-number of years
Generally we need to put $1000 for the next 18 years so this statement looks like this:

and the last invest

So we need to add all years of capital



And finally we get this statement:

and after all put values we get:

$
I don't know what value of tax you have so it is gross value. You need to sybtract tax from this received value