"The balance of pleasure minus pain"
Except this seems all wrong. It's just not true that there's any equivalence between a mixed experience (100 - 25 = 75) and a shorter purely pleasurable experience (75 - 0 = 75). It would be perfectly reasonable for someone to prefer one over the other. The whole idea that pain and pleasure neatly sum, like bank deposits and debits, is one of those things that seems reasonable only if you never think about it. Rather than there being a sum, it seems to me there are just two dimensions, good and bad, and various ways they can relate to each other. Sometimes a person will think the bad is worth it for the good, and sometimes not, but this is not something you can determine by a simple calculation. It's not simply a question of whether the balance is positive or negative.
Here's a mixed experience of recent memory, where the judgment could be "worth it" or "not worth it," and the balance does not decide the matter. On Mother's Day our family went to a sculpture museum, and my 14 year old son dropped his ipod touch on a concrete floor. The screen shattered so badly you could see the innards of the device--shocking! He was not a happy boy. An hour later we were driving home past an Apple store. I suggested we go in and ask whether the device could be fixed. We talked to one of the geniuses at the genius bar (the Apple people are geniuses at naming things), and he said the thing wasn't fixable, but my son could have a new ipod for half price. We said thank you and we'd think about it, but then the guy turned the ipod on and saw my son's wallpaper, which was a photo of a bumpersticker that said "The road to hell is paved with Republicans." He told my son he liked the wallpaper so much he'd give him a new ipod touch for free--which he did. Now he was a very happy boy.
On the way home I asked him what he thought about this whole one hour period of his life. Was the misery worth it for the happiness, or not? I don't think this was a simple question of making a mathematical calculation. He wasn't thinking about whether he was now in the red or in the black. The judgment was a primitive "worth it" judgment--was it worth going through the first 59 minutes of that hour to get to the last, thrilling minute?
Answer (which surprised me): no. But it could have been yes, consistent with all the facts about quantities of pain and pleasure.