What this calculator can determine
This calculator converts an IPv4 address and subnet mask into a complete subnet profile. It finds the network address, broadcast address, usable host range, wildcard mask, CIDR block, address capacity, binary values, hexadecimal form, class information, and reverse DNS guidance. It also checks whether an entered default gateway belongs to the same subnet.
Advanced modes compare overlapping networks, split a large network into equal blocks, and create variable-length subnet plans. The IPv6 mode expands compressed addresses, calculates prefix boundaries, identifies common address types, and shows the first and last address in the selected prefix.
Formula used for IPv4 subnet calculations
The bitwise AND operation preserves bits that are set in both the address and mask. Host bits become zero in the network address. The wildcard mask sets every host bit to one. Applying it to the network produces the broadcast address.
How to use this calculator
Analyze one IPv4 subnet
Choose the IPv4 subnet and gateway mode. Enter an IPv4 address. Add either a CIDR prefix or a dotted subnet mask. The gateway field is optional. Choose a gateway suggestion rule, then calculate. The gateway result explains whether the entered address is inside the usable range.
Compare two networks
Enter two CIDR blocks. The comparison reports whether they overlap, match, or contain one another. An optional test IP can be checked against both ranges. This mode is useful when reviewing route tables, firewall objects, cloud networks, or migration plans.
Split a network
Enter a base CIDR and a longer target prefix. The calculator generates equal-size child networks. Every row includes the mask, first host, last host, broadcast address, and usable capacity. Very large splits are limited on screen to protect browser performance.
Create a VLSM plan
Enter a base network. Add one department or purpose per line. Follow each name with a comma and required host count. The planner sorts the largest requirement first. It assigns the smallest suitable subnet, suggests a gateway, and reports unused addresses.
Analyze an IPv6 prefix
Enter a valid IPv6 address and prefix length. The result shows compressed and expanded notation, prefix boundaries, address type, interface bits, and child prefixes. IPv6 has no broadcast address. Multicast performs functions that broadcast commonly served in IPv4.
Default gateway validation
A default gateway is normally a router interface in the local subnet. This calculator can validate a known gateway or suggest a common address. It cannot discover the configured router from only an IP address and mask. Networks may use the first host, last host, a virtual address, or another convention.
An ordinary gateway should not equal the subnet network address or broadcast address. It must fall inside the assignable host range. A /31 point-to-point network follows different rules. A /32 route represents one host and normally does not describe a shared LAN gateway.
CIDR, masks, and host capacity
Common IPv4 prefixes
| CIDR | Mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /20 | 255.255.240.0 | 4,094 |
| /22 | 255.255.252.0 | 1,022 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 2 |
| /32 | 255.255.255.255 | 1 |
Private IPv4 ranges
| Range | Typical use |
|---|---|
| 10.0.0.0/8 | Large private networks |
| 172.16.0.0/12 | Medium private networks |
| 192.168.0.0/16 | Home and small office LANs |
| 169.254.0.0/16 | Automatic link-local addressing |
| 100.64.0.0/10 | Carrier-grade NAT |
Binary calculation example
Consider IP address 192.168.1.25 with mask 255.255.255.0. The first 24 bits identify the network. The final eight bits identify a host. A bitwise AND produces 192.168.1.0. Setting every host bit to one produces 192.168.1.255. The usable range is normally 192.168.1.1 through 192.168.1.254.
Route aggregation and conversion utilities
The conversion mode translates CIDR prefixes, subnet masks, wildcard masks, numeric IPv4 values, hexadecimal values, and binary values. Host sizing finds the smallest practical subnet for a requested capacity. Subnet sizing determines how many network bits must be borrowed from a base block.
Route summarization removes covered routes and repeatedly combines exact sibling networks. It also reports the smallest single covering supernet. That single supernet can include extra addresses when the input routes are not perfectly aligned, so review the warning before advertising it.
Planning DHCP ranges
The DHCP suggestion leaves a small static range at the beginning when space permits. It also tries to avoid the entered or suggested gateway. This is only a planning aid. Real deployments may reserve addresses for routers, switches, access points, servers, printers, controllers, and monitoring systems.
Frequently asked questions
Can the calculator find my real default gateway?
No. It can validate or suggest an address. The actual gateway comes from device configuration, DHCP, routing policy, or network documentation.
Can I enter a subnet mask instead of CIDR?
Yes. Use a contiguous dotted mask such as 255.255.255.0. Non-contiguous masks are rejected because ordinary CIDR subnetting requires consecutive network bits.
Why does a /31 show two usable addresses?
RFC 3021 permits both addresses on point-to-point IPv4 links. There is no traditional network and broadcast reservation in that specific use.
Why does a /32 show one address?
A /32 identifies a single IPv4 host. It is common in routing, firewall objects, loopbacks, and access rules.
What does a wildcard mask do?
It is the inverse of the subnet mask. Wildcard masks are commonly used in access control lists and some routing configurations.
How does VLSM reduce waste?
VLSM gives each segment the smallest suitable subnet. Large networks are allocated first. Smaller blocks then fit into the remaining address space.
Does IPv6 have a broadcast address?
No. IPv6 uses multicast and neighbor discovery instead. The calculator therefore reports broadcast as not applicable in IPv6 mode.
Can I export a subnet plan?
Yes. Successful calculations can be downloaded as CSV, JSON, or a simple PDF. Browser printing can also create a formatted PDF.