When I donate to a charity I compare the altruistic benefit my marginal contribution will produce to the amount I'm donating. This doesn't work very well, because it's really hard to estimate the benefit to society. But it still worth doing, because there are a lot of really valuable things that aren't going to be funded unless we put up our money.