Per IRS Publication 970 Tax Benefits for Education, page 12:
You can't claim the American opportunity credit for 2022 if any of the following apply:
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.