Find the last usable host address in an IP subnet.
The last usable host address is the broadcast address minus one. The broadcast address (all host bits set to 1) is reserved for subnet-wide communication, so the address just before it is the last one assignable to a host device.
Last host
last_host = broadcast_address - 1
Packets sent to the broadcast address are delivered to every host on the subnet — assigning it to a specific device would break this fundamental networking mechanism and cause unpredictable behavior.
Some administrators assign the last usable host to the default gateway by convention (while others use the first). Either is valid — choose one convention and apply it consistently.