# IP Subnet Calculator

Calculate network address, broadcast address, usable host range, and subnet mask from any IP and CIDR prefix. See binary representation and wildcard mask.

## What this calculates

Enter an IP address and CIDR prefix length to instantly see the network address, broadcast address, usable host range, and total number of hosts. Handy for network planning, firewall rules, and VLAN configuration.

## Inputs

- **IP Octet 1** — min 0, max 255
- **IP Octet 2** — min 0, max 255
- **IP Octet 3** — min 0, max 255
- **IP Octet 4** — min 0, max 255
- **CIDR Prefix Length** (/) — min 0, max 32 — Subnet mask prefix from /0 to /32 (e.g. /24 = 255.255.255.0)

## Outputs

- **Network Address** — formatted as text
- **Broadcast Address** — formatted as text
- **Subnet Mask** — formatted as text
- **First Usable Host** — formatted as text
- **Last Usable Host** — formatted as text
- **Total Addresses**
- **Usable Hosts**
- **Wildcard Mask** — formatted as text
- **IP in Binary** — formatted as text

## Details

Subnetting divides a larger network into smaller segments. The CIDR prefix (like /24) tells you how many bits are used for the network portion of the address.

How it works:

  - Network address -- the first address in the subnet, identifies the network itself

  - Broadcast address -- the last address, used to reach all hosts on the subnet

  - Usable hosts -- every address between network and broadcast (total addresses minus 2)

  - Wildcard mask -- the inverse of the subnet mask, used in ACLs and OSPF configs

Common subnets:

  - /32 -- single host (1 address)

  - /30 -- point-to-point link (2 usable hosts)

  - /24 -- standard LAN (254 usable hosts)

  - /16 -- large network (65,534 usable hosts)

  - /8 -- class A (16,777,214 usable hosts)

## Frequently Asked Questions

**Q: What is a CIDR prefix length?**

A: CIDR (Classless Inter-Domain Routing) notation uses a slash followed by a number from 0 to 32 to indicate how many bits of the IP address are the network portion. For example, /24 means the first 24 bits are the network part, leaving 8 bits (256 addresses) for hosts.

**Q: Why are there 2 fewer usable hosts than total addresses?**

A: The first address in a subnet is reserved as the network address and the last address is the broadcast address. Neither can be assigned to a device, so a /24 subnet with 256 total addresses has 254 usable host addresses.

**Q: What is a wildcard mask used for?**

A: A wildcard mask is the bitwise inverse of a subnet mask. It is commonly used in Cisco ACLs and OSPF area configurations to specify which bits of an address should be matched. For a /24 subnet, the wildcard mask is 0.0.0.255.

**Q: What are private IP address ranges?**

A: Private (RFC 1918) ranges are: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255). These are not routed on the public internet.

---

Source: https://vastcalc.com/calculators/everyday/ip-subnet
Category: Everyday Life
Last updated: 2026-04-08
