After adding long term stock sales and its corresponding cost basis, refund amount reduces much larger than 15%. Is there a bug?

My federal refund was calculated to be about $9k before entering information.
Entered in dividend of about $750 and long term stock gains (includes cost basis) of about $16k (from stock sale of $22k). Considering 15% of $16k is $2.4k, why did my currently calculated refund drop from $9k to $5k?