When making decisions about goods and actions, humans and animals often rely on internally represented values. However, to be useful across a wide range of contexts, these values need to be represented on an absolute scale – a coding scheme that is computationally costly. By contrast, representing values in a way that depends entirely on context is highly computationally efficient, but can lead to irrational behaviour when values need to be compared across contexts. Thus, an efficient learner would allocate limited computational resources only when needed according to their expectations about the future. Here, we test the hypothesis that value representation is not fixed, but rationally adapted to expectations in two human learning experiments. Unlike most lab-based tasks, participants could use their initial experience (Phase 1) to optimise behaviour (Phase 2). Phase 1 was designed to cause one group to expect only decisions within local contexts (relative code sufficient), and another group to expect choices across local contexts (relative code insufficient). Despite identical learning experiences, the group whose expectations included choices across local contexts, went on to learn absolute value representations, and learned more absolute-like representations than the other group. Human value representation is neither relative nor absolute, but efficiently and rationally tuned to task demands.