Subnet And IP Address Calculator
Calculate IPv4 subnet details including network address, broadcast address, usable host range, subnet mask, wildcard mask, and CIDR notation.
Enter an IPv4 address such as 192.168.1.10.
Enter the slash value from 0 to 32, such as 24 for /24.
Status: initial
Results
Awaiting calculation
Introduction
IPv4 subnetting divides a network into address blocks. This calculator takes an IPv4 address and CIDR prefix length, then returns the network address, broadcast address, usable host range, subnet mask, wildcard mask, and binary breakdown.
Purpose
Use this calculator to check subnet math while planning small networks, studying networking concepts, configuring routers, reviewing firewall rules, or validating CIDR notation.
How subnet calculation works
The calculator converts the IPv4 address and subnet mask into 32-bit numbers. The network address is found with a bitwise AND between the IP address and mask. The broadcast address is found by combining the network address with the wildcard mask.
Variable explanations
A dotted-decimal address with four octets from 0 to 255, such as 192.168.1.10.
The slash number that indicates how many bits belong to the network prefix, such as /24.
The dotted-decimal mask that separates network bits from host bits.
The inverse of the subnet mask, commonly used in access control list matching.
Formula and method guide
Subnet mask
Mask = first N bits set to 1, remaining bits set to 0
- N is the CIDR prefix length from 0 to 32.
- A /24 mask is 255.255.255.0.
The prefix length tells how many bits identify the network portion of the address.
Network address
Network address = IP address AND subnet mask
- The IP address is converted to a 32-bit number.
- The subnet mask keeps the network bits and clears host bits.
The result is the first address in the subnet block.
Broadcast address
Broadcast address = network address OR wildcard mask
- Wildcard mask is the inverse of the subnet mask.
- Host bits are set to 1.
The result is the last address in the subnet block for ordinary IPv4 subnets.
Total addresses
Total addresses = 2^(32 - prefix length)
- A shorter prefix leaves more host bits and more addresses.
For example, /24 leaves 8 host bits, so it contains 256 total addresses.
Worked examples
Typical home subnet
- Enter 192.168.1.10 as the IPv4 address.
- Enter 24 as the CIDR prefix length.
- The network address is 192.168.1.0 and the broadcast address is 192.168.1.255.
Small /30 subnet
- Enter an IPv4 address in a /30 network.
- The total address count is 4.
- The common usable host count is 2.
Point-to-point /31 subnet
- Enter a prefix length of 31.
- The calculator treats both addresses as usable for point-to-point style networks.
- Review your device and routing requirements before using /31.
Single-host /32 route
- Enter a prefix length of 32.
- The network and broadcast values are the same address.
- The result represents a single IPv4 address.
Common mistakes
Mixing subnet mask and IP address
A subnet mask such as 255.255.255.0 is not usually assigned as a host IP address.
Forgetting reserved addresses
Traditional IPv4 subnets reserve the network and broadcast addresses, reducing ordinary usable host count by two.
Assuming classful rules only
Modern IPv4 routing commonly uses CIDR, so the prefix length matters more than old class A, B, and C defaults.
Using IPv6 in an IPv4 field
This release is IPv4-only. IPv6 subnetting is a future extension.
FAQs
What does this subnet calculator calculate?
What is CIDR notation?
What is a subnet mask?
What is a wildcard mask?
What is the network address?
What is the broadcast address?
Why are usable hosts sometimes total addresses minus two?
How are /31 networks handled?
How are /32 networks handled?
Does this support IPv6?
Can I enter a dotted subnet mask instead of CIDR?
What is a private IPv4 address?
Can this replace network engineering review?
Does this calculator send IP data to a server?
Are formulas calculated in the page component?
References
Related calculators
Last updated and version history
Last updated: 2026-07-05
- 1.0.0 (2026-07-05): Initial IPv4 CIDR subnet calculator release.