If I donate shares of stock to a charitable organization, how do I figure my charitable contribution?

Do I deduct my cost basis of the stock from the value of the shares acknowledged by the charity?