Install ipcalc on Raspberry Pi

Install ipcalc on Raspberry Pi

The ipcalc is a command line tool that allows to calculate network and broadcast addresses, wildcard mask, host address range, and number of hosts for a given IPv4 address and netmask.

This tutorial shows how to install ipcalc on Raspberry Pi.

Use SSH to connect to Raspberry Pi. Update the package lists and install ipcalc by using the following commands:

sudo apt update
sudo apt install -y ipcalc

When the installation is completed, we can check ipcalc version:

ipcalc --version

Run the ipcalc command and provide IPv4 address to perform calculations:


An example of output:

Address:          11000000.10101000.00000000. 00000001
Netmask: = 24   11111111.11111111.11111111. 00000000
Wildcard:            00000000.00000000.00000000. 11111111
Network:       11000000.10101000.00000000. 00000000
HostMin:          11000000.10101000.00000000. 00000001
HostMax:        11000000.10101000.00000000. 11111110
Broadcast:        11000000.10101000.00000000. 11111111
Hosts/Net: 254                   Class C, Private Internet

If the netmask is not provided, ipcalc will use the default netmask for class of the network. Class C network use the default netmask of /24 (

The netmask can be given in CIDR notation:


or in dotted decimal notation:


If ipcalc is no longer necessary, you can completely remove it with command:

sudo apt purge --autoremove -y ipcalc

Leave a Comment

Cancel reply

Your email address will not be published.