An essential component of every economic transaction is a willingness-to-pay (WTP) computation in which buyers calculate the maximum amount of financial resources that they are willing to give up in exchange for the object being sold. Despite its pervasiveness, little is known about how the brain makes this computation. We investigated the neural basis of the WTP computation by scanning hungry subjects' brains using functional magnetic resonance imaging while they placed real bids for the right to eat different foods. We found that activity in the medial orbitofrontal cortex and in the dorsolateral prefrontal cortex encodes subjects' WTP for the items. Our results support the hypothesis that the medial orbitofrontal cortex encodes the value of goals in decision making.