529 plan

my daughter recieves scholarships, we withdrew $ as nonqualified with the understanding that we are only liable for taxes on the gains...and not a 10% penalty.  will Turbotax be able to differentiate between gains and penalty?