The amount of taxable IRA distributions for your Massachusetts tax return is the amount of conventional IRA distributions you received during 2018 minus any IRA plan contributions you made to the account, unless those IRA contributions have already reduced the amount of taxable IRA distributions on a previous tax return, and minus any qualified charitable IRA distributions you received in 2018 that are included in the distribution.
For example, let's say you had an IRA distribution of $10,000, you had previously contributed $6,000 to your IRA, and you had $500 in qualified charitable IRA distributions. If this is the first IRA distribution you've ever received, the taxable amount for Massachusetts would be $3,500 ($10,000 - $6,000 - $500). However, if you took a $1,500 IRA distribution last year, then $1,500 of the IRA contributions would've already been used last year to reduce your taxable IRA distribution on your prior year Massachusetts return. In this case, your 2018 taxable IRA distribution would be $5,000 instead of $3,500 since $1,500 of the $6,000 IRA contributions were already previously used.