> For the complete documentation index, see [llms.txt](https://wiki.smhuda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.smhuda.com/pentesting/tool-usage/ip-calculator.md).

# IP Calculator

## Calculate IPs from a subnet:

```
ipcalc 192.0.0.0/3
ipcalc 192.168.0.135
```

### Subnet Slicing:

Thanks to CIDR, we can finely slice and dice A, B, or C networks into multiple subnets, and ipcalc makes subnetting easy. Suppose you want to make two Class B subnets; just tell ipcalc the network segment you want to divide and how many hosts in each segment. In this example we want 15 hosts in each subnet:

```
ipcalc 172.16.1.0/24 -s 15 15
```
