It used to say 8GB capacity in the General > About Settings menu. Now it only says 5.4. I've done a "restore as new" but it's still showing the same.
The operating system (OS: iOS 8.x) is using up space as well and you're not able to use this space. The phone comes with 8GB, yes, but minus the space used for the OS. I think Apple got into problems when they advertised with 8GB/16GB etc. while people could only effectively use that space MINUS the space used by the OS.