it doesnt take too long....I'd say no more than 5 minutes if you dont include downloading, which you can do other stuff in the meanwhile...
1. install adb, fastboot, and the factory image you would like.
How to setup ADB and Fastboot on a Mac or Windows computer | AFTVnews for adb & fastboot,
https://developers.google.com/android/nexus/images for the factory image
2. prepare all of the stuff. basically, make a folder on your desktop titled "android" and then copy and paste each .img file from the factory images you downloaded. i prefer to rename the bootloader image to bootloader.img and the radio to radio.img (they are quite long and confusing)
3. plug your phone into your computer and turn your phone off. then, while youre holding the power button to turn your phone on, also hold down the volume down button. This will enter into the bootloader.
4. enter this into your computer -> cd /desktop/android [enter] fastboot devices [enter] then make sure your computer returns something
5. fastboot oem unlock [enter] then go the right direction
6. fastboot reboot-bootloader [enter]
7. fastboot flash bootloader bootloader.img [enter] fastboot reboot-bootloader [enter]
8. fastboot flash radio radio.img [enter] fastboot reboot-bootloader [enter]
9. fastboot flash recovery recovery.img [enter] fastboot reboot-bootloader [enter]
10. fastboot flash boot boot.img [enter] fastboot reboot-bootloader [enter]
11. fastboot flash cache cache.img [enter] fastboot reboot-bootloader [enter]
12. fastboot flash system.img [enter] fastboot reboot-bootloader [enter]
13. fastboot flash userdata.img [enter] fastboot reboot-bootloader [enter]
14. then go ahead and press start. You will notice that the bootloader screen changes, under the google on the google screen you will see an "unlock" symbol, and the boot animation changes. that's how you know it's working. make sure your phone boots up correctly and go ahead and make sure you can sign in to google and all of that. i wouldnt do much else though because i believe the next and final step erases your data again.
15. go back to bootloader and then on your computer go fastboot devices [enter] to make sure your phone is connected. to finish everything, enter this: fastboot oem lock [enter] this will re-lock your bootloader, so your phone will appear as if nothing happened. this will get rid of that unlock symbol on the google screen when you reboot.
There! now your phone is on marshmallow
Of course, you can simply do a FDR with no sim inserted, but nothing is guaranteed...