MAGI max (and calculation) to contribute to IRA and get a tax deduction

To maximize the 8K for myself/spouse , IRA (non roth)  what is the MAX MAGI?    Note, I will put $9550 in to and HSA.    Current understanding - $126K + 16K (two IRA) + 9550 HSA = $151K.     Also will tax harvest stocks, and have a net -$500 to reduce AGI.

Thanks.