BRev Free Tools
At BRev Digital, essentials should be a right — free, forever.
Open in workspacekeep several tools open at once
All tools
Subnet calculator

Subnet & CIDR calculator

Paste anything a network gives you — 192.168.1.0/24, an address with a mask, a bare IP, or an IPv6 prefix — and see the network, broadcast, usable range, masks and counts, with the /31 and /32 special cases handled properly. Split the block, test whether an address is inside it, check two CIDRs for overlap, aggregate a list, and copy the result in the form your firewall or cloud console expects.

Read as CIDR notationIPv4
/0/32/24
or pick a mask
Try an example
192.168.1.0/24192.168.1.0192.168.1.255
Private (RFC 1918)RFC 1918
Private address space — the home/office default. Usable inside your own network; needs NAT to reach the internet.
Where the prefix cutsthe address in binary — everything left of the rule is the network
Address — 192.168.1.0
11000000192.10101000168.000000011.000000000
Mask — 255.255.255.0
11111111255.11111111255.11111111255.000000000
network bits (24)host bits (8)The rule is the whole idea of CIDR: /24 means “the first 24 bits are fixed”. Every address that shares those bits is in the block — 28 of them.
Split 192.168.1.0/24carve it into equal subnets — or say what you need and get the prefix
new prefix
#SubnetRangeBroadcastUsable
1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.6362
2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.12762
3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.19162
4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.25562
Is it inside? Do they overlap?the two questions firewall and VPC work actually asks
Yes192.168.1.137 is inside 192.168.1.0/24192.168.1.137 AND 255.255.255.0 = 192.168.1.0 — the same network address, so it is inside.

A contains B10.0.0.0/8 covers 10.0.0.010.255.255.255; 10.1.2.0/24 covers 10.1.2.010.1.2.255. They share 256 addresses: 10.1.2.010.1.2.255.
Worth knowing: two proper CIDR blocks can only ever be identical, nested, or completely separate — a partial overlap is impossible. That is not a quirk of this tool, it is what makes CIDR work: because blocks nest cleanly, a router can pick the longest matching prefix without ambiguity. If two rules seem to half-overlap, one of them is not really a CIDR block (it is a start–end range).
Summarize a listpaste IPs or CIDRs — get the smallest covering block and a properly aggregated list
Why two answers: the covering block is one CIDR that contains everything, which usually means claiming addresses you did not list. The aggregated list is exact — it covers your entries and nothing else, merging blocks only where they are genuinely adjacent and correctly aligned. 192.168.0.128/25 + 192.168.1.0/25 are next to each other but do not merge: the pair is not aligned on a /24 boundary.
Copy-ready192.168.1.0/24 in the form each tool wants
CIDRThe canonical form — network address, masked. Paste this anywhere a “CIDR block” is asked for.192.168.1.0/24
Terraformaws_security_group_rule / ingress block. For IPv6 the argument is ipv6_cidr_blocks.cidr_blocks = ["192.168.1.0/24"]
AWS CLI — security group ingressSwap the group id and port. IPv6 needs --ip-permissions with Ipv6Ranges instead of --cidr.aws ec2 authorize-security-group-ingress --group-id sg-XXXXXXXX --protocol tcp --port 443 --cidr 192.168.1.0/24
iptablesSource-address match. ip6tables is the IPv6 binary — the syntax is otherwise identical.iptables -A INPUT -s 192.168.1.0/24 -j ACCEPT
nginxInside a location/server block, followed by deny all;.allow 192.168.1.0/24;
Kubernetes NetworkPolicyUnder ingress.from or egress.to.- ipBlock: cidr: 192.168.1.0/24
Cisco ACL (wildcard mask)Cisco ACLs invert the mask: a 0 bit must match, a 1 bit is “don’t care”.access-list 101 permit ip 192.168.1.0 0.0.0.255 any
Cisco static route (netmask)Routing statements take the ordinary netmask, not the wildcard.ip route 192.168.1.0 255.255.255.0 <next-hop>
CIDR in one pagewhat the slash actually means

An IPv4 address is one 32-bit number wearing a costume: 192.168.1.10 is four bytes printed in decimal with dots between them. CIDR — Classless Inter-Domain Routing — simply says how many of those bits from the left are fixed. /24 means “the first 24 bits identify the network; the remaining 8 are free”. That is the whole idea, and the binary view above is it drawn out: everything left of the rule is fixed, everything right of it varies, and the number of addresses is 2 raised to the number of free bits.

Why a /24 is 256 addresses but 254 hosts

Eight free bits give 28 = 256 addresses. Two of them are spoken for: the network address(all host bits 0) names the block itself, and the broadcast address (all host bits 1) reaches everyone on the segment. Neither can be assigned to a machine, which leaves 254 usable. That is the “minus two” rule — and it is where most calculators go wrong, because it does not always apply:

  • /31 — 2 addresses, 2 usable. On a point-to-point link there is nobody to broadcast to, so RFC 3021 hands both addresses to the two routers. A calculator that reports “0 usable” for a /31 is applying a rule that was explicitly retired for this case in 2000.
  • /32 — 1 address, 1 usable. A host route. There is no block to name and nothing to broadcast to, so the single address is simply itself. Firewall rules, loopbacks and BGP announcements all use this form.
  • IPv6 — no subtraction at all. IPv6 has no broadcast address; multicast does that job. The only address to be careful with is the all-zeros one in a subnet, which is the subnet-router anycast address (RFC 4291).

VLSM, in two sentences

Variable-Length Subnet Masking means the subnets you carve out of a block do not all have to be the same size — give a 500-host office a /23, a 20-host branch a /27, and a router link a /31, all from the same parent. The only rules are that each subnet must start on a boundary that its own size divides evenly, and that the pieces must not overlap; the Split card above always produces equal subnets, so use it once per size and take the remaining space forward.

Private address space (RFC 1918)

BlockRangeAddressesWhere you see it
10.0.0.0/810.0.0.0 – 10.255.255.25516,777,216Large corporate networks, cloud VPCs — room to carve hundreds of subnets.
172.16.0.0/12172.16.0.0 – 172.31.255.2551,048,576Docker’s default pool, mid-size networks. Note it is /12, not /16 — 172.32.x is public.
192.168.0.0/16192.168.0.0 – 192.168.255.25565,536Home and small-office routers. Usually handed out one /24 at a time.

These three blocks are yours to use inside your own network, and no router on the internet will carry them. Two ranges get mistaken for them: 100.64.0.0/10 is carrier-grade NAT space that belongs to your ISP — using it in your own LAN causes collisions you cannot debug — and 169.254.0.0/16 is what a machine assigns itself when DHCP does not answer, so seeing one is a symptom, not a design.

IPv6: the /64 convention

IPv6 subnets are almost always /64, and not because 18 quintillion addresses are needed on a LAN. The lower 64 bits are the interface identifier, and SLAAC — the mechanism by which a host configures itself without DHCP — assumes it has all 64 of them. Make a LAN smaller than /64 and stateless autoconfiguration stops working. So the sizes you actually choose between are the ones above the LAN: a /48 per site (65,536 LANs), a /56 per small site (256 LANs), a /64 per LAN. Point-to-point links between routers are the documented exception — RFC 6164 recommends /127 there.

Reading a wildcard mask

Cisco ACLs take the mask inverted: 0.0.0.255 is the wildcard for a /24. A 0 bit means “this bit must match”, a 1 bit means “don’t care”. Routing statements on the same box take the ordinary netmask, which is why 255.255.255.0 and 0.0.0.255 both show up in one config for the same subnet. The Copy-ready card above emits the right form for each.

Every number on this page is computed in your browser — nothing is uploaded, and no lookup leaves your device.