After you file

So ... in 2016 the max the credit that could have been used  was  3995  and 2496 in 2017... any unused credit is carried forward. You may not get the max if you have other non refundable credits which are used first to allow more of the solar credit to be carried forward.  So if you are putting the panels in 2018 then your tax liability (line 44) less the nonrefundable credits used is what the benefit will be in 2018 and the unused portion is carried forward.