IPv4 addresses contain 32 bits. A CIDR prefix says how many leading bits belong to the network, while the remaining bits identify addresses inside that block. This calculator accepts a prefix such as /26 or its contiguous mask 255.255.255.192. It uses unsigned 32-bit arithmetic locally, so no address or network plan is uploaded.
IPv4 Subnet Calculator
Runs entirely in your browser - no upload, no sign-up.
Paste a host address. A CIDR suffix updates the prefix when you leave the field.
Use a prefix from 0 to 32, or a contiguous dotted-decimal mask.
Common CIDR prefixes
The network, broadcast, masks, host range, and capacity will appear here live.
What is an IPv4 subnet calculator?
An IPv4 subnet calculator turns an IP address and CIDR prefix into the network address, broadcast address, subnet and wildcard masks, usable host range, and address capacity. Enter a host such as 192.168.1.10 with /24, and the calculator finds the boundaries of its subnet instantly in your browser.
How to use
- 01Enter an IPv4 address
Type a host address such as 10.20.30.40. You can also paste CIDR notation such as 10.20.30.40/20.
- 02Choose the subnet size
Enter a prefix from 0 to 32, paste a dotted subnet mask, or choose a common prefix button.
- 03Read the network boundaries
Check the network, first and last usable host, broadcast, masks, scope, and address counts.
- 04Copy the report
Use Copy all results to place the complete subnet summary on your clipboard.
Who it's for
- Network engineers checking VLAN boundaries before assigning gateways and DHCP pools.
- System administrators confirming network and broadcast addresses in interface or firewall configuration.
- Students and certification candidates checking manual CIDR and subnetting exercises.
- Developers validating private network ranges used by containers, virtual machines, and test environments.
FAQ
Is my IP address or network plan uploaded?
No. The IPv4 parsing, bit masks, range boundaries, and host counts are calculated in your browser. The values you enter are not sent to a subnetting API or saved by this tool, which makes it suitable for checking internal address plans.
Is this IPv4 subnet calculator free?
Yes. The calculator is free to use without an account, payment, download, or calculation limit. It uses built-in browser arithmetic rather than a paid service, so you can calculate as many IPv4 subnets as you need.
What is the largest subnet this calculator supports?
It supports every IPv4 prefix from /0 through /32. A /0 contains all 4,294,967,296 IPv4 addresses, while a /32 contains one address. JavaScript represents every count in that range exactly, so no rounding is needed.
How many usable hosts are in a /24 subnet?
A /24 subnet contains 256 total addresses because eight bits remain for addresses. Under the usual broadcast-network convention, one address identifies the network and one is the broadcast address, leaving 254 usable host addresses.
How do I convert a subnet mask to CIDR?
Count the consecutive 1 bits in the subnet mask. For example, 255.255.255.0 contains 24 leading 1 bits, so it is /24. You can paste a contiguous dotted mask into this calculator and it will resolve the prefix automatically.
Why does a /31 subnet show two usable hosts?
RFC 3021 allows both addresses in a /31 block to be endpoints on a point-to-point link. There is no need to reserve separate network and broadcast addresses on that link, so both addresses are usable.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of the subnet mask. A /24 mask of 255.255.255.0 therefore has a wildcard mask of 0.0.0.255. Wildcard masks commonly appear in access-control and routing configuration.