State tax filing

Thank you for your reply @Hal_Al 

 

So, in case if I had made $3000 in Jan-2020 (NH Income) and $9000 (IL Income) for the rest of the year as capital gain, then I have to pay IL taxes only on $9000. Is it correct understanding?