Step 1: Download both the Chainfire Auto-Root package and Odin3 from the links above, and extract them to a convenient location on your PC.
Step 2: Put your Galaxy S4 into Download mode. This can be done by powering down the device and turning it back on by pressing and holding the volume down + power keys. Follow on-screen instructions to achieve Download mode.
Step 3: Fire up Odin on your PC and connect your phone (in Download mode) via USB cable. Let Odin configure things if it’s the first run – when device is properly connected, one of the COM boxes on top will turn yellow along with it containing a COM Port number.
Step 4: In Odin, click on PDA and select the CF Auto-Root file that you download in Step 1. Also check that Auto Reboot and F. Reset Time are ticked in Odin, whilst leaving all other settings as they are.
Step 5: Hit the Start button when ready. The process should take hardly a minute after which your device will automatically boot into recovery and set the SuperSU binaries in place.