You would use the $4000 because Massachusetts calculate an amount based on the TOTAL income, then applies the percentage of Mass vs. nonMass income- so it is proportional when the deduction is applied.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"