If i restore my iphone will i get all my space back?

If i restore my iphone will i get all my space back?

Yes it will format everything and install the operating system again.

All but what space is used for the iPhones operating system and firmware.

Yes, but of course would lose all data in the process