Unqualified 529K Withdrawal and Lifetime Learning Credit

Does anybody know if the IRS double dipping rule applies to only the earnings portion of a 529K withdrawal, or the entire withdrawal amount? Trying to maximize the Lifetime Learning Credit on my daughter’s taxes.

Thanks!

@BelknapPoint

The double dipping rule can apply to the whole 529 distribution, but the tax will only be assessed against the earnings part of any unqualified distribution.