Please refer to the thread at the link below.
https://ttlc.intuit.com/community/investments-and-rental-properties/discussion/my-return-says-form-8960-worksheet-your-calculations-could-not-be-completed-reference-code-2-871-273/01/1720368