Learning the Art of Electronics - diode clamp
I would draw the schematic like this:







simulate this circuit &ndash; Schematic created using CircuitLab

That (for me) makes it easy to see that the diode will start to conduct when the voltage at out exceeds 5 V + the diode's forward voltage, so at about 5.6 V.