IPv4 Network Calculator
Enter an IPv4 address and either a subnet mask (255.255.255.0) or CIDR prefix (/24 or 24).
If you work with routers, firewalls, VLANs, cloud networks, or home lab gear, subnet math comes up constantly. This calculator helps you quickly derive the key values you need from an IP address and netmask: network ID, broadcast address, host range, wildcard mask, total hosts, and more.
What this IP address and netmask calculator does
Given an IPv4 address and a subnet definition, this tool computes the complete subnet information in one step. You can enter subnet definitions in two common formats:
- Dotted-decimal netmask (example:
255.255.255.0) - CIDR prefix (example:
/24or24)
The calculator validates your input and returns the values network admins use most often when assigning addresses and building ACLs.
Quick refresher: IP address vs netmask
IPv4 address
An IPv4 address has 32 bits, displayed as four octets. Example: 192.168.1.42. Some bits represent the network, and the remaining bits represent the host.
Subnet mask
The netmask marks which bits belong to the network portion. In 255.255.255.0, the first 24 bits are network bits and the last 8 are host bits. That’s why this mask is equivalent to /24.
CIDR notation
CIDR is shorthand for “how many leading 1s” are in the mask. A /16 means the first 16 bits are network bits. It’s compact and widely used in cloud and enterprise configuration files.
How to use this calculator effectively
- Enter a valid IPv4 address (0–255 in each octet).
- Enter netmask as dotted decimal or CIDR.
- Click Calculate.
- Review network details and host range.
Use the Clear button to reset fields and start over.
Understanding the output fields
- Network Address: First address of the subnet.
- Broadcast Address: Last address used to reach all devices in the subnet (except /31 and /32 nuances).
- First / Last Usable: Host assignment range.
- Wildcard Mask: Inverse of subnet mask, commonly used in ACL rules.
- Total Addresses: Number of addresses in the block.
- Usable Hosts: Assignable host count, with /31 handled per RFC 3021.
- Binary View: Helpful when learning subnet boundaries.
Real-world examples
Example 1: Small LAN
IP: 192.168.10.77, Mask: /24
Network: 192.168.10.0
Broadcast: 192.168.10.255
Usable hosts: 254
Example 2: Point-to-point link
IP: 10.0.0.1, Mask: /31
Usable hosts are shown as 2 addresses per RFC 3021, commonly used for router-to-router links.
Example 3: Single host route
IP: 203.0.113.45, Mask: /32
Network, first host, and last host are all the same address.
Common subnetting mistakes to avoid
- Using non-contiguous masks (invalid in modern networking).
- Mixing host and network addresses in static assignments.
- Forgetting that broadcast addresses are not assignable in standard subnets.
- Confusing wildcard mask with subnet mask in firewall rules.
Why this matters in cloud, DevOps, and security
Subnet accuracy affects routing tables, security groups, NAT policies, VPN tunnels, and service reachability. A single bit mistake can break connectivity or expose systems unintentionally. Tools like this reduce manual errors and speed up deployment work.
FAQ
Does this calculator support IPv6?
This version is focused on IPv4 only.
Can I enter /24 with or without a slash?
Yes. Both /24 and 24 are accepted.
What happens if my subnet mask is invalid?
You’ll see an error message. The calculator validates contiguous subnet masks and legal IPv4 ranges.