Long-term thinking and voluntary resource sharing are two distinctive traits of human nature. Across three experiments (N=1,082), I propose a causal connection: Sometimes people are generous because they think about the future. Participants were randomly assigned to either focus on the present or the future and then made specific decisions in hypothetical scenarios. In Study 1 (N=200), future-focused participants shared more money in a public dictator game than present-focused participants (+39%), and they were willing to donate more money to charity (+61%). Study 2 (N=410) replicated the positive effect of future-focus on dictator giving when the choice was framed as public (+36%), but found no such effect when the choice was framed as private. That is, focusing on the future made participants more generous only when others would know their identity. Study 3 was a high-powered and pre-registered replication of Study 1 (N=472), including a few extensions. Once again, future-focused participants gave more money to charity in a public donation scenario (+40%), and they were more likely to volunteer for the same charity (+17%). As predicted, the effect was mediated by reputational concern, indicating that future-orientation can make people more generous because it also makes them more attuned to the social consequences of their choices. Taken together, the results suggest that focusing on the future promotes reputation-based generosity. By stimulating voluntary resource sharing, a central function of human foresight might be to support cooperation in groups and society.