We study the social discount rate, taking into account inequality within generations, that is, across countries or individuals. We show that if inequality decreases over time, the social discount rate should be lower than the one obtained by the standard Ramsey rule under certain but reasonable conditions. Applied to the global discount rate and due to the projected convergence across countries, this implies that the inequality adjusted discount rate should be about twice as high as the standard Ramsey rule predicts. For individual countries on the other hand, where inequality tends to increase over time, the effect goes in the other direction. For the United States for instance, this inequality effect leads to a reduction of the social discount rate by about 0.5 to 1 percentage points. We also present an analytical formula for the social discount rate allowing us to disentangle inequality, risk, and intertemporal fluctuation aversion.