I live in NJ but work in NY, so I file NY and NJ state returns. I also sold a house in MD. Since that house was rented for a year when I did not live there, I need to pay taxes on a portion of the capital gain I made reselling it.
My understanding is that since the house was in MD, though I did not live in MD and had no income there, I need to pay state taxes on the percentage of the capital gain that is federally taxable (instead of adding it to my NJ income).
Am I correct? Do I have also to file MD taxes?