CIDR Subnet Calculator
Calculate IPv4 and IPv6 CIDR blocks: network, broadcast, netmask, wildcard, host range and counts. Split subnets, test an IP, or turn a range into CIDRs.
How to use CIDR Subnet Calculator
- 1Type an address with a prefix, like 192.168.1.10/24 or 2001:db8::/32, or a dotted netmask such as 10.0.0.0/255.255.0.0.
- 2Read the network, host range, counts and binary view, or switch the mode to split the block, test an IP or convert a range.
- 3Copy the result as text, or download it as a file.
What makes it better
- Four modes on every visit: Calculate, Split into subnets, Contains (is this IP inside these CIDRs) and Range to CIDR
- IPv4 and IPv6 with exact BigInt arithmetic; a /64 shows 18446744073709551616 addresses, not a rounded float
- Explains the /31 (RFC 3021) and /32 host rules instead of silently showing negative or zero hosts
- Labels private (RFC 1918), CGNAT, loopback, link-local, documentation, multicast and IPv6 ULA ranges
- Strict input checking with plain messages for octets over 255, bad masks and out-of-range prefixes
About CIDR Subnet Calculator
CIDR Subnet Calculator takes an address such as 192.168.1.10/24, a dotted netmask or a bare IP and shows the network address, broadcast, netmask, wildcard mask, first and last usable host and the host counts. The same page splits a block into smaller subnets, checks whether an IP falls inside one or several CIDR blocks, and converts a start and end address into the shortest list of CIDR blocks. IPv6 is handled with exact big-number arithmetic, so even a /0 block gives the true address count.
Common uses
- Plan how to cut a /16 office or VPC network into equal subnets for several teams.
- Check whether a server's address is covered by a firewall or allow-list entry written as CIDR.
- Turn a vendor's start and end IP range into the CIDR blocks a cloud security group will accept.
- Work out the wildcard mask for an access-list or the usable host count before an address plan is signed off.
Example
Input
192.168.1.10/24
Result
Network: 192.168.1.0/24 Netmask: 255.255.255.0 (/24) Wildcard: 0.0.0.255 Broadcast: 192.168.1.255 First host: 192.168.1.1 Last host: 192.168.1.254 Total addresses: 256 Usable hosts: 254 Type: Private (RFC 1918) Class: C
Good to know
- This page only does arithmetic on the text you type. It cannot tell whether an address is in use, who owns it or where it is routed, and it makes no network requests.
- Leading zeros in an IPv4 octet (010) are read as decimal and flagged, because some tools read them as octal. A prefix such as /24 with host bits set (192.168.1.10/24) is accepted and shown as its network.
- Split mode lists at most 1,024 subnets, and Contains mode at most 10,000 lines; the real totals are still shown. IPv4-mapped addresses in IPv6 form (::ffff:1.2.3.4) are treated as IPv6, not converted to IPv4.
CIDR Subnet Calculator FAQ
How many usable hosts are in a /24, /26 or /30 network?
Take the total of 2 to the power of the host bits and subtract two for the network and broadcast addresses. A /24 has 256 addresses and 254 usable hosts, a /26 has 64 and 62, and a /30 has 4 and 2.
Why does a /31 show two usable hosts and a /32 show one?
RFC 3021 allows a /31 on point-to-point links, so both addresses are hosts and there is no broadcast address. A /32 names a single host. Older tools that subtract two would report zero or negative hosts for these.
What is the difference between a netmask and a wildcard mask?
A netmask has ones for the network part (255.255.255.0 for a /24), while a wildcard mask is its bitwise inverse (0.0.0.255). Router access lists on some vendors use the wildcard form; this page shows both.
Does CIDR work the same for IPv6?
The prefix idea is identical, but IPv6 has no broadcast address and every address in the block counts as a host. Subnets are normally /64, and the page prints compressed and fully expanded forms of the address.
How do I convert an IP range into CIDR blocks?
Switch to Range to CIDR, enter the first and last address, and the page returns the smallest list of aligned blocks that covers exactly that range. A range such as 10.0.0.5 to 10.0.0.200 needs nine blocks, not one.
Are the addresses I enter sent anywhere?
No. The calculation is plain arithmetic in your browser, so the addresses and prefixes you type stay on your device.