Terry53029
Level 14
Level 14

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