How is the amount of an education credit determined?

To calculate an education credit you must factor in:

The education tax credit amount for each eligible student is also subject to a phaseout.   

You must use Form 8863, Education Credits (American Opportunity and Lifetime Learning Credits), to calculate and claim an education credit.

Note: You can't claim the American opportunity credit on either an original or an amended return if either you or the student didn't have a taxpayer identification number by the due date of your return (including extensions), even if you or the student later gets one of those numbers.