Terry53029
Level 15
Level 15

there is a good worksheet in pub 936 page 12 that will help you to figure it out.

Link: https://www.irs.gov/pub/irs-pdf/p936.pdf