ipcalc

sudo apt-get install ipcalc

To generate info as per presented by iOS phones
ipcalc 172.20.10.7/28
which produces:

Address: 172.20.10.7 10101100.00010100.00001010.0000 0111
Netmask: 255.255.255.240 = 28 11111111.11111111.11111111.1111 0000
Wildcard: 0.0.0.15 00000000.00000000.00000000.0000 1111
=>
Network: 172.20.10.0/28 10101100.00010100.00001010.0000 0000
HostMin: 172.20.10.1 10101100.00010100.00001010.0000 0001
HostMax: 172.20.10.14 10101100.00010100.00001010.0000 1110
Broadcast: 172.20.10.15 10101100.00010100.00001010.0000 1111
Hosts/Net: 14 Class B, Private Internet

compare with
wlan0:
inet 172.20.10.7 netmask 255.255.255.240 broadcast 172.20.10.15

Tags: