IPv4 Subnet Calculator
Calculate subnet details from address and mask.
IPv4 Subnet Calculator: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv4 Subnetting & RangeAll Tools
IPv4 Range Calculator
Find address boundaries from a prefix.
Network Address Calculator
Find the subnet’s network address.
IPv4 Broadcast Address Calculator
Find broadcast addresses where applicable.
First and Last Address Calculator
Identify a range’s endpoints.
Usable IPv4 Host Range Calculator
Apply the selected subnet-use rules.
Total Address Count Calculator
Count addresses within a prefix.
How IPv4 Subnet Calculator Works?
This tool works by combining an address with a subnet mask and deriving 8 values: network address, broadcast address, first host, last host, subnet mask, wildcard mask, total addresses, and usable hosts.
Enter an address and mask
Type an address such as
192.168.50.77and pick a mask in dotted form (255.255.255.224) or CIDR form (/27).Validate the mask
The calculator confirms that the mask has contiguous 1 bits followed by contiguous 0 bits. A mask such as
255.0.255.0fails this check.Compute the subnet boundaries
The network address comes from IP AND mask. The broadcast address comes from network OR wildcard.
List hosts and counts
Usable hosts sit between network + 1 and broadcast − 1. /31 and /32 prefixes follow RFC 3021 and host-route rules instead.
IPv4 Subnet Calculator Formula
The formula set is Network = IP AND Mask, Broadcast = Network OR Wildcard, and Usable Hosts = 2^(32 − p) − 2.
Network address
Network = IP AND MaskBitwise AND across all 32 bits.
Wildcard mask
Wildcard = 255.255.255.255 − MaskEach octet of the wildcard is 255 minus the matching mask octet.
Broadcast address
Broadcast = Network OR WildcardSets every host bit to 1.
Usable hosts
Usable = 2^(32 − p) − 2Valid for /0 to /30. A /31 has 2 usable addresses and a /32 has 1.
Worked example: 192.168.50.77 with 255.255.255.224 (/27)
Last octet 77 = 01001101 Mask octet 224 = 11100000 AND = 01000000 = 64 → Network 192.168.50.64 Wildcard = 0.0.0.31 → Broadcast 192.168.50.95 Host range = 192.168.50.65 – 192.168.50.94 Usable hosts = 2^5 − 2 = 30
IPv4 Subnet Calculator Conversion Table
The table lists the network, broadcast, and usable host count for 192.168.50.77 under 10 different subnet masks.
| Subnet Mask | CIDR | Network | Broadcast | Usable Hosts |
|---|---|---|---|---|
| 255.255.248.0 | /21 | 192.168.48.0 | 192.168.55.255 | 2,046 |
| 255.255.252.0 | /22 | 192.168.48.0 | 192.168.51.255 | 1,022 |
| 255.255.254.0 | /23 | 192.168.50.0 | 192.168.51.255 | 510 |
| 255.255.255.0 | /24 | 192.168.50.0 | 192.168.50.255 | 254 |
| 255.255.255.128 | /25 | 192.168.50.0 | 192.168.50.127 | 126 |
| 255.255.255.192 | /26 | 192.168.50.64 | 192.168.50.127 | 62 |
| 255.255.255.224 | /27 | 192.168.50.64 | 192.168.50.95 | 30 |
| 255.255.255.240 | /28 | 192.168.50.64 | 192.168.50.79 | 14 |
| 255.255.255.248 | /29 | 192.168.50.72 | 192.168.50.79 | 6 |
| 255.255.255.252 | /30 | 192.168.50.76 | 192.168.50.79 | 2 |
What is IPv4 Subnet Calculator?
The IPv4 Subnet Calculator is a tool that returns every key property of an IPv4 subnet from one address and one subnet mask. The output covers the network address, broadcast address, host range, wildcard mask, and host counts in a single view.
Subnetting divides a larger IPv4 network into smaller broadcast domains. Each subnet uses a mask, written as dotted decimal (255.255.255.224) or as a CIDR prefix (/27), to mark which of the 32 bits identify the network. The IPv4 Subnet Calculator reads either notation and produces identical results.
Network engineers, students preparing for the Cisco Certified Network Associate (CCNA) exam, and cloud architects use the IPv4 Subnet Calculator to configure interfaces, plan Virtual Local Area Networks (VLANs), and confirm address assignments before deployment.
What are the uses of IPv4 Subnet Calculator?
There are 6 main uses of the IPv4 Subnet Calculator, including interface configuration, VLAN design, and exam preparation.
Configuring router interfaces
Router and Layer 3 switch interfaces need an address and a mask. The calculator confirms that the chosen address is a usable host, not the network or broadcast address.
Designing VLAN subnets
Each VLAN maps to one subnet. The host count shows whether a /26 (62 hosts) or a /25 (126 hosts) fits the VLAN.
Setting DHCP scopes
Dynamic Host Configuration Protocol (DHCP) pools must stay inside the usable host range. The first and last host values set the pool limits.
Troubleshooting connectivity
Two hosts with mismatched masks often fail to reach each other. The calculator shows the subnet each host believes it belongs to.
Preparing for certification exams
CCNA, CompTIA Network+, and JNCIA exams test subnet math. The calculator checks hand-worked answers in seconds.
Documenting network designs
Design documents list network, mask, gateway, and broadcast for each segment. The calculator output fills those fields directly.