Deductions & credits

Can someone (an expert) explain why TurboTax lowers the amount of my refund when I enter the cost basis as other than $0?  The entire market value should be deductible as a charitable donation. Cost basis should make to difference in the value of the donation (deduction) but it certainly does in TurboTax.