IP subnet calculator
IP subnet calculator (with binary visualization and subnet allocation)
Use this IP subnet calculator to quickly determine the subnet mask, wildcard mask, network address, broadcast address, and usable host range for an IPv4 subnet.
Enter any IPv4 address that belongs to the subnet, choose the desired CIDR prefix, and the calculator will generate the full subnet information.
| IP address | — | |
| Network address | — | |
| Broadcast | — | |
| Subnet mask | — | |
| Wildcard mask | — | |
| First usable host | — | |
| Last usable host | — | |
| Total addresses | — | |
| Usable hosts | — | |
| CIDR notation | — |
Binary visualization
Subnet allocation
| # | Subnet | First host | Last host | Broadcast | Hosts |
|---|
How to use the subnet calculator
Using the calculator is straightforward:
- Enter any IPv4 address that belongs to the subnet you want to analyze.
- Select the CIDR prefix (for example
/24,/27,/30). - Click Calculate.
- Review the results including the network address, broadcast address, and host range.
You can use the copy button next to each field to quickly reuse values in firewall rules, configuration files, or documentation.
Example subnet calculations
Example 1 — common office subnet
Input
IP address: 192.168.1.10
CIDR prefix: /24
Result
Network address: 192.168.1.0
Broadcast address: 192.168.1.255
Usable hosts: 254
Example 2 — smaller subnet
Input
IP address: 10.10.20.14
CIDR prefix: /27
Result
Network address: 10.10.20.0
Broadcast address: 10.10.20.31
Usable hosts: 30
Example 3 — point-to-point subnet
Input
IP address: 172.16.50.2
CIDR prefix: /30
Result
Network address: 172.16.50.0
Broadcast address: 172.16.50.3
Usable hosts: 2
Learn more about subnetting
Subnetting is the process of dividing a larger IPv4 network into smaller logical networks called subnets.
Each subnet has its own network address, broadcast address, and usable host range. This allows administrators to segment infrastructure, reduce broadcast traffic, and manage IP space more efficiently.
For example, instead of keeping all devices in a single 192.168.1.0/24 network, you might divide it into multiple /26 or /27 subnets for different departments or services.
This calculator determines several important properties of an IPv4 subnet:
- Network address — the first address that identifies the subnet
- Broadcast address — the address used to send packets to all hosts
- First usable host — the first assignable IP address
- Last usable host — the last assignable IP address
- Subnet mask — defines the network boundary
- Wildcard mask — the inverse of the subnet mask
- Usable hosts — the number of assignable IP addresses
- CIDR notation — the subnet expressed as a prefix length
This information is commonly required when configuring routers, firewalls, DHCP scopes, and VLAN networks.
A subnet mask and a CIDR prefix represent the same network boundary in different formats.
/24=255.255.255.0/27=255.255.255.224/30=255.255.255.252
CIDR notation is shorter and widely used in routing tables, firewall rules, and network documentation.
For example:
192.168.1.10/24
The prefix /24 means that the first 24 bits define the network portion of the address.
A subnet mask divides an IPv4 address into two logical parts:
- Network portion — identifies the network
- Host portion — identifies a device inside that network
For example:
IP address: 192.168.1.10
Subnet mask: 255.255.255.0
This means the network is 192.168.1.0/24, and devices from 192.168.1.1 to 192.168.1.254 can exist inside that subnet.
In a traditional IPv4 subnet two addresses are reserved:
- the network address
- the broadcast address
Because of this, a subnet with 256 total addresses (for example a /24) has only 254 usable host addresses.
Subnetting is commonly used when designing structured networks:
- separating departments or VLANs
- isolating servers from user devices
- reducing broadcast traffic
- organizing address allocation
- improving network security boundaries
Most enterprise and infrastructure networks rely heavily on subnetting to maintain scalable and manageable IP addressing.
Typical subnetting mistakes include:
- using the wrong subnet mask for the required host count
- confusing total addresses with usable hosts
- assigning the network or broadcast address to a device
- mixing CIDR prefixes and masks incorrectly
- forgetting to update DHCP scopes or firewall rules
Other tools
You may also find these tools useful:
Related guides
Helpful networking references:
- Private IPv4 address ranges explained
- How CIDR notation works
- Subnetting explained for system administrators
Cheat Sheets
Usefull cheat sheets:
- Subnet mask cheat sheet
