Install ipcalc on Ubuntu 20.04

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

This tutorial demonstrates how to install ipcalc on Ubuntu 20.04.

Install ipcalc

Run the following command to update the package lists:

sudo apt update

Install ipcalc:

sudo apt install -y ipcalc

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

ipcalc --version

Testing ipcalc

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


Output example:

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

By default, ipcalc uses default netmask for class of the network. Class C network use the default netmask of /24 (

We can provide the netmask in CIDR notation as follows:


or in dotted decimal notation:


Uninstall ipcalc

If the ipcalc is no longer needed, you can remove it:

sudo apt purge --autoremove -y ipcalc

Leave a Comment

Your email address will not be published.