Deductions & credits

You need to review the Sch D carefully ... all cap gains are netted against cap losses first and then up to $3000 of excess losses are allowed against ordinary income on the 1040.

 

If this home sale was taxable and reported on the 8949 or 4797 then it would have already been netted against the loss using it up in full so the rest of your question is mute.   If the home sale was excluded from income because it was a personal residence  then the loss will be limited to a max of $3000 on the 1040 and the rest carried forward.  The state follows the same rules.