IP Address / Subnet Calculator
IPv4 subnet calculator tool. Enter a CIDR prefix length or subnet mask to instantly display the network address, broadcast address, host range, total host count, wildcard mask, and binary representation. Useful for network design and troubleshooting.
Calculate network address, broadcast address, host range, and more from any IPv4 address and subnet mask. Supports both CIDR notation (/24) and dotted decimal (255.255.255.0).
IP Address / Subnet Calculator
How to Use
Enter an IP address and subnet, then click the Calculate button to instantly display all network information.
- Enter the IPv4 address you want to analyze in the 'IP Address' field (e.g. 192.168.1.100)
- Enter the subnet in CIDR notation (e.g. /24 or 24) or dotted decimal format (e.g. 255.255.255.0) in the 'Subnet' field
- Click the 'Calculate' button to display the network address, broadcast address, host count, and more
- Results are automatically saved to history and can be reviewed later
The subnet field accepts both CIDR format (/24) and dotted decimal format (255.255.255.0). All prefix lengths from /0 (entire address space) to /32 (single host) are supported.
What is a Subnet? — Basics of Classless IP Addressing
A subnet is a technique for dividing an IP address space into smaller networks. Modern networks use CIDR (Classless Inter-Domain Routing) to efficiently manage IPv4 addresses. In CIDR notation, an address like '192.168.1.0/24' uses the number after the slash (the prefix length) to indicate how many bits belong to the network portion.
A subnet mask is a 32-bit value that separates the network portion from the host portion of an IP address. For example, /24 corresponds to a subnet mask of 255.255.255.0 (binary: 11111111.11111111.11111111.00000000), where the first 24 bits are the network part and the remaining 8 bits are the host part. The network address is obtained by ANDing the IP address with the mask; the broadcast address is obtained by ORing with the inverted mask (all host bits set to 1).
Because the network address and broadcast address cannot be assigned to hosts, the number of usable hosts is 2^(32 − prefix length) − 2. For a /24 subnet, this is 2^8 − 2 = 254 hosts. The wildcard mask is the bitwise inverse of the subnet mask and is commonly used in ACL (access control list) configurations on routers and firewalls.
Use Cases
Subnet calculations are needed at every stage of network design, management, and troubleshooting. Here are five common scenarios where this tool comes in handy.
- Network Design with VLSM: When dividing office or factory LANs into subnets by department or floor, use this tool to confirm the address range and host count for each subnet. For example, splitting 10.0.0.0/8 into /16 blocks gives 256 subnets. With VLSM (Variable Length Subnet Masking), you can assign larger blocks (e.g. /22) to departments with many devices and smaller ones (e.g. /26) to those with fewer — optimizing address space without waste. Use this calculator to verify each block's range and ensure there are no overlaps.
- Cloud and Kubernetes Environments: When configuring subnets in cloud environments like AWS VPC or Azure VNet, verifying network and broadcast addresses beforehand prevents CIDR block overlaps. Kubernetes clusters also require careful planning to ensure Pod CIDRs and Service CIDRs do not clash with node subnets — especially in multi-region or multi-cluster deployments where thorough address planning is essential.
- Network Troubleshooting: Many connectivity issues — such as 'ping not reaching' or 'unstable communication' — are caused by misconfigured subnets. Hosts on different subnets cannot communicate without going through a router, so entering IP addresses and masks helps you quickly verify whether two hosts are on the same network. This is especially useful for network engineers performing on-site configuration checks.
- Firewall and ACL Configuration: Access control lists (ACLs) on routers and Layer 3 switches use wildcard masks to specify address ranges. For example, '10.0.0.0 0.0.255.255' matches the entire 10.0.0.0/16 block. You can copy the wildcard mask calculated by this tool directly into your Cisco IOS or Juniper configuration files, making it particularly useful when writing or reviewing firewall rules and ACL entries.
- IP Address Management (IPAM) and Documentation: Enterprise networks use IPAM tools like NetBox or spreadsheet-based records to track address blocks. When allocating a new subnet, you need to calculate the network address, broadcast address, and usable host count before recording them in your IPAM system or configuration management documents. This tool lets you gather all that information at once and copy it directly into your records.
A practical tip for subnet design: 'don't carve too small, don't allocate too large.' Building in around 20–30% headroom for future device additions or organizational changes will reduce the need for painful redesigns later.
Frequently Asked Questions
- Q. What is the difference between CIDR and a subnet mask?
- CIDR notation (e.g. /24) expresses the prefix length — the number of bits in the network portion — using a slash. A subnet mask (e.g. 255.255.255.0) expresses the same information in dotted decimal format. Both convey the same information, and this tool accepts both formats.
- Q. Why is the host count 2 less than the total number of addresses?
- The first address (network address) and last address (broadcast address) in each subnet cannot be assigned to hosts. Therefore, the number of usable hosts equals the total number of addresses minus 2. For /24, this is 256 − 2 = 254.
- Q. What are the private IP address ranges?
- The private IP address ranges defined by RFC 1918 are: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B equivalent), and 192.168.0.0/16 (Class C equivalent). These are not routed on the public internet and are widely used in corporate LANs, home networks, and internal cloud networks.
- Q. Does this tool support IPv6?
- Currently, only IPv4 is supported. IPv6 uses a 128-bit address space with significantly different calculation methods, so IPv6 support is planned for a future update.
Number Base Converter
When working with binary data, our number base converter lets you convert between binary, octal, decimal, and hexadecimal in real time.