Subnet And IP Address Calculator
Calculate IPv4 subnet details including network address, broadcast address, usable host range, subnet mask, wildcard mask, and CIDR notation.
- subnet
- ip subnet
- cidr
- subnet mask
- wildcard mask
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
Subnet capacity
Explore the subnet and ip address calculator result visually while keeping this page's detailed guidance and examples.
Use this result well
- 1Verify the calculator inputs.
- 2Compare the key result relationships.
- 3Review the page guidance before acting.
Network and broadcast addresses are normally unavailable to hosts.
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, host bits, block size, nearby prefix reference, ACL-style wildcard example, and binary breakdown.
Purpose
Use this calculator to check subnet math while planning small networks, studying networking concepts, configuring routers, reviewing firewall rules, validating CIDR notation, or converting between prefix, subnet mask, and wildcard mask.
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
Understand what each input and result means before calculating.
IPv4 address
A dotted-decimal address with four octets from 0 to 255, such as 192.168.1.10.
CIDR prefix length
The slash number that indicates how many bits belong to the network prefix, such as /24.
Subnet mask
The dotted-decimal mask that separates network bits from host bits.
Wildcard mask
The inverse of the subnet mask, commonly used in access control list matching.
Host bits
The number of bits available for addresses inside the subnet.
Block size
The total number of IPv4 addresses covered by the prefix.
Address type
A practical classification such as private, public, loopback, link-local, multicast, documentation, or reserved.
Reviewed by the Calculator.org.in Editorial Team
Formula behavior, validation cases, explanatory examples, and cited sources are checked before publication. This review supports educational accuracy and is not a substitute for qualified professional advice.
Last reviewed: 2026-08-03
Formula guide
See the calculation logic, variable definitions, and practical meaning.
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.
Usable hosts
Usable hosts = total addresses - 2
- /31 and /32 are special cases.
- Traditional subnets reserve network and broadcast addresses.
The calculator treats /31 as two usable point-to-point addresses and /32 as one host route.
Host bits
Host bits = 32 - prefix length
- IPv4 addresses are 32 bits long.
Host bits determine the address block size and host capacity.
Wildcard mask
Wildcard mask = 255.255.255.255 - subnet mask
- Wildcard masks are often used in Cisco-style ACLs and routing statements.
In a wildcard mask, 0 bits must match and 1 bits may vary.
Worked examples
Follow realistic inputs through the calculation step by step.
Worked example
Typical home subnet
- 1Enter 192.168.1.10 as the IPv4 address.
- 2Enter 24 as the CIDR prefix length.
- 3The network address is 192.168.1.0 and the broadcast address is 192.168.1.255.
Worked example
Firewall wildcard example
- 1Enter 192.168.1.10 and /24.
- 2The network is 192.168.1.0 and the wildcard mask is 0.0.0.255.
- 3A Cisco-style ACL match can use 192.168.1.0 0.0.0.255.
Worked example
Small /30 subnet
- 1Enter an IPv4 address in a /30 network.
- 2The total address count is 4.
- 3The common usable host count is 2.
Worked example
Point-to-point /31 subnet
- 1Enter a prefix length of 31.
- 2The calculator treats both addresses as usable for point-to-point style networks.
- 3Review your device and routing requirements before using /31.
Worked example
Single-host /32 route
- 1Enter a prefix length of 32.
- 2The network and broadcast values are the same address.
- 3The result represents a single IPv4 address.
Worked example
Prefix comparison
- 1Use the nearby prefix reference to compare /23, /24, and /25 style changes.
- 2A smaller slash number creates a larger address block.
- 3A larger slash number creates a smaller address block.
Worked example
Special address check
- 1Enter 203.0.113.9/32.
- 2The calculator identifies it as a documentation address.
- 3Use the address-scope note before assuming an address is routable on the public internet.
Common mistakes
Avoid these common input and interpretation errors.
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 calculator is intentionally IPv4-only. Use the dedicated IPv6 Subnet Calculator for 128-bit prefixes, notation, scope, reverse DNS, and child-prefix planning.
Misreading wildcard masks
In wildcard masks, 0 means the bit must match and 1 means it can vary. This is the inverse of how subnet masks are usually explained.
Assuming documentation addresses are public test targets
Ranges such as 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are reserved for examples.
Forgetting /31 and /32 special cases
/31 networks are commonly used for point-to-point links, while /32 represents a single host route.
Changing production routing from calculator output alone
Subnet math should still be reviewed with routing, DHCP, NAT, firewall, and device configuration context.
Frequently asked questions
Quick answers to the questions users ask most often.
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?
What are host bits?
What is block size?
How do I use the wildcard ACL example?
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?
What is a carrier-grade NAT address?
What are documentation IPv4 addresses?
Can I compare nearby subnet sizes?
Can this replace network engineering review?
Does this calculator send IP data to a server?
Are formulas calculated in the page component?
References
Sources used to support the calculator guidance.
Related calculators
Continue with calculators that solve nearby problems.
Version history
A transparent record of calculator content updates.
- 1.1.0 · 2026-08-03
Added host bits, block size, subnet math, wildcard ACL example, prefix reference, special address notes, and expanded subnetting guidance.
- 1.0.0 · 2026-07-05
Initial IPv4 CIDR subnet calculator release.
