After downloading a Mac OS installer, you try to install the OS but the installation cannot continue because it says there is not enough space on Mac for Sierra or High Sierra. MacOS Disk Utility Error 'MediaKit reports not enough space on device for requested operation'. This process is Data Destructive and cannot be undone. 10.11.x (El Capitan) and macOS 10.12.x (Sierra), and 10.13 (High Sierra) Disk Utility.
I've run into this before when using networked backup, also said something like 497GiB were free when actually 4TiB were free. Seems this is caused by TM not creating a large enough sparsebundle for the initial backup. I found a workaround that at least worked for me (El Capitan) and submitted a bug report to Apple. Workaround: You should notice that the sparsebundle on the OS X server has only 499GiB as its capacity. Manually enlarge it by running this command on the server: sudo hdiutil resize -size number of gigabytesg path to sparsebundle, e.g. Sudo hdiutil resize -size 10000g /Volumes/Backups/mybackup.sparsebundle. Make it as large as you need.
Retry your backup. Edit: You may also have to resize the sparsebundle's partition in Disk Utility. I didn't have to do this, but maybe that's because my backup wasn't encrypted. For instructions, see the first (not accepted) answer here. I had the same problem, so maybe my experience will be helpful.
I have a 24TB ThunderBay RAID hooked up to my iMac and although there was enough space on my separate Time Machine HD (via USB), it gave me a warning that I needed over 2.5TB of extra space for a Time Machine backup of 120GB. After reformatting the TM-HD, I finally unmounted the ThunderBay RAID, then switched it off and removed the Thunderbolt connection from the iMac. Only then did the TM backup to the Time Machine HD immediately work without a hitch. Maybe something in the TM prefs got severely confused by having the RAID hooked up, but for me this solved the problem.