Deductions & credits

and in @Hal_Al 's example,  this is why it's best to pay the money from the 529 directly to the college...because any taxable earnings end up on the student's tax return and it's unlikely (but possible) that the student owes any taxes because their earnings are typically low.