AOTC with 529, loans, grants, room and board, and scholarships

I am struggling with allocating educational expenses to maximize AOTC while taking into account unrestricted scholarships, restricted scholarships, grants, loans, room and board, and 529 distributions, and I'd appreciate any help.  This seems so convoluted to me.

 

Background: Daughter is 19 and in her second year of college.  She has $5,047 of W2 income from her job. Her federal withholding was $0, but she had about $50 in state withholding.  We think claiming her as a dependent will be more financially beneficial for us (parents) than for her to claim herself.  Total parental income is $113,000 with $84,000 taxable income, so we are well under the limit to claim the full AOTC.  Daughter attended two universities in 2024 that I'll call University A and B.  University A is a nightmare for my calculations, but University B seems very simple.

 

Tuition and fees at University A was $3,515. She received a restricted scholarship (I verified) for $1,985 that can only be used for tuition and fees.  She paid $207 for books and supplies.  My calculation is that qualified education expenses at University A is: $3,515 tuition and fees - $1,985 restricted scholarship = $1,530 + $207 books = $1,737 adjusted qualified expenses at University A.  

 

She received an unrestricted scholarship of $833.  She received an unsubsidized loan of $1,019 and a subsidized loan of $797.  She also received a Pell Grant of $449.  She received another grant of $785 that was totally unexpected, and it was meant to cover three quarters of school, two of which happened in 2023 (she got it halfway through 2024).  I added these all up to get $3,883 in scholarships/grants at University A.  BUT...

 

She has a state-sponsored 529 plan and received total distributions of $1,134 for 2024.  Room and board at University A was $3,040.  Is it okay to allocate the entire $1,134 distribution to University A for room and board if we didn't actually pay that amount to University A all at one time?  We actually requested more than we needed for University A, reimbursed some of it (she overestimated book costs), she got the unexpected $785 grant, we sent the whole $785 to the 529 plan, and then we paid some from the 529 plan to University B later in the year.  Basically... $1,134 is mathematically accurate for the total 529 distribution for the year for both schools, and that is what it on her 1099-Q.  It just didn't all go to University A or go all in one chunk, so I'm not sure I'm allowed to say "she paid $1,134 to University A from her 529 plan for room and board."

 

Tuition and fees at University B was $5,095.  She received a restricted scholarship that can only be used for tuition and fees in the amount of $3,094 (I verified it was restricted).  She paid $61 for books and supplies.  She received an unrestricted scholarship of $1,000, and she received $75 from a subsidized loan.  She lived off-campus.  University B expenses seem pretty straightforward since there is no room and board, grants, etc.  I calculated qualified education expenses at University B to be: tuition and fees of $5,095 - $3,094 restricted scholarship = $2,001 + $61 books = $2,062 qualified expenses at University B.  Is that accurate?

 

So what I'm not quite sure of is...

 

1. Are my numbers correct for qualified expenses?  It would be $1,737 for University A + $2,062 for University B, which is a total of $3,799.  That is below the $4,000 maximum for AOTC, but that's all I can document in qualified expenses.  I thought I couldn't claim any room and board for AOTC.

 

2. Should she claim $3,799 as taxable income on her taxes so we can claim as much AOTC as possible if we claim her as a dependent?  I don't mind paying any taxes due on it for her, but it didn't look like she owed any (from my initial run at the numbers).

 

3. What do I do about that $785 grant, since we didn't know it was supposed to partially count towards expenses for 2023?  Should we only claim $261 for that grant ($785 divided by three quarters of school, with only one in 2024)?

 

4. How do I account for that grant since I paid the entire $785 to the 529 plan when she received it in 2024?  She didn't keep any of it since it went to the 529 plan, and the 529 plan sort of "accounted" for it by adjusting what was distributed to her for the entire year on her 1099-Q.  Can I deduct the $785 from my total for her scholarships/grants for University A in that calculation, if so?

 

Any help would be amazing.  I feel like I'm overthinking this, but I have zero interest in running afoul of the IRS.