Ah, OK.
"complete factory reset" , meaning Restore (backup if needed, erase completely, download latest iOS, and install to your erased device) is not something you can do from iOS. Restoring from an iCloud backup gives you the same system that you had...
The closest that you can get from within iOS is Settings/General/Reset, then Erase all Content and Settings. That process removes the system and all files/settings, so resets your system to defaults. Then, you restore from your iCloud backup. But, no new system is downloaded and installed. You get what you had. YOU need the download of the latest IPSW (the latest system install for your device) AFAIK, You can only only do that from iTunes. I think you can download the IPSW that you need, if you know where it can be downloaded, and you also know how to select the correct download for YOUR device (there are dozens available through Apple's servers, but only one will work on your device.) iTunes takes care of all that for you...
How does the old saying go?