Deductions & credits

Hello.

If form 1099Q is not included in the tax form, how does TurboTax estimate the tax on the 529 portion for the trade-off with the American Opportunity Credit.

My son's tuition and fees bill is 9000. Of that, 7,000 is paid with a non taxable scholarship. The remaining 2,000 were paid off with the 10,000 529 distribution (the other 8,000 of the distribution was used for room and board).

The earnings in the 529 account were 2k, basis 8k. Roughly speaking.

So a portion of the 2k has to be taxable, yes?