IP Subnet Calculator & CIDR Visualizer

Type an IPv4 address and a prefix or subnet mask to get the network, broadcast, usable host range, wildcard mask and host count, see the bits in binary, split the block or plan VLSM subnets.

Calculator Networking Updated Oct 6, 2026
Learn how this works
How to Use
  1. Type an IPv4 address, such as 192.168.10.37. You can also type it with its prefix, 192.168.10.37/26, and the prefix box is ignored.
  2. Enter the prefix length (26 or /26) or the subnet mask (255.255.255.192). A wildcard mask such as 0.0.0.63 or a hex mask such as 0xffffffc0 also works.
  3. Read the network, broadcast, usable range and host count, then the All values table below: masks in dotted, binary and hex form, the historical class and the IANA address type. Click any value to copy it.
  4. Scroll to the binary view to see where the network bits end, and use the splitter to cut the block into equal subnets, or type host counts (Sales 50, Lab 20, WAN 2) for a VLSM plan.
  5. Check the /0–/32 table, where your prefix is highlighted, and Show Work for every step, including the block-size shortcut used in CCNA exams.
Input
IPv4, optional /prefix
/0–/32 or dotted mask
Presets
Subnet
Network
—
Broadcast
—
Usable range
—
Usable hosts
—
All values (click to copy)
Binary view
Network bitsHost bits
Subnet splitter and VLSM
name and count, comma-separated
Equal split
VLSM plan
CIDR prefix and subnet mask table, /0 to /32
PrefixSubnet maskWildcard maskAddressesUsable hostsNote
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294whole IPv4 space
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214size of an old Class A
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302100.64.0.0/10 (RFC 6598)
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574172.16.0.0/12 (RFC 1918)
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534size of an old Class B
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254size of an old Class C
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342classic point-to-point link
/31255.255.255.2540.0.0.122point-to-point, RFC 3021
/32255.255.255.2550.0.0.011single host

Worked Example

192.168.10.37/26. A /26 mask has 26 ones: 11111111.11111111.11111111.11000000, or 255.255.255.192. That leaves 6 host bits, so each block holds 26 = 64 addresses. In the last octet the blocks start at 0, 64, 128 and 192 (256 − 192 = 64), and 37 falls in the first one. The network is 192.168.10.0, the broadcast is 192.168.10.63, hosts use 192.168.10.1 to 192.168.10.62, and there are 64 − 2 = 62 usable addresses. The wildcard mask is 0.0.0.63.

172.16.5.20/20. The mask is 255.255.240.0, so this time the boundary is in the third octet, which steps in blocks of 256 − 240 = 16: 0, 16, 32 and so on. 5 falls in the 0–15 block, so the network is 172.16.0.0 and the broadcast is 172.16.15.255. That is 212 = 4,096 addresses and 4,094 usable hosts, from 172.16.0.1 to 172.16.15.254.

The common mistake: zeroing only the last octet. It is tempting to write the /20 network as 172.16.5.0, the way a /24 works. That is wrong: a /20 mask ends four bits into the third octet, so the third octet is rounded down to its block too, 5 → 0. The network is 172.16.0.0, and 172.16.5.0 is just an ordinary host address inside it.

A /31 link. 198.51.100.6/31 holds 2 addresses. Under the usual rule it would have 2 − 2 = 0 hosts, but RFC 3021 lets a point-to-point link use both 198.51.100.6 and 198.51.100.7, with no broadcast address.

Show Work

Enter an address and a prefix to see the working.

Formulas

Subnet mask
mask = p ones followed by (32 − p) zeros
/26 → 255.255.255.192
Network address
network = address AND mask
192.168.10.37 AND 255.255.255.192 = 192.168.10.0
Wildcard mask
wildcard = NOT mask = 255.255.255.255 − mask
255.255.255.192 → 0.0.0.63
Broadcast address
broadcast = network OR wildcard
192.168.10.0 OR 0.0.0.63 = 192.168.10.63
Addresses and hosts
hosts = 232 − p − 2
/26: 64 − 2 = 62; /31: 2 (RFC 3021); /32: 1
Block size shortcut
block = 256 − mask octet
255.255.240.0: 256 − 240 = 16 in the third octet
VLSM block for h hosts
p = 32 − ⌈log₂(h + 2)⌉
50 hosts → 64-address block → /26
Equal split
subnets = 2new p − old p
/16 into /24s: 28 = 256 subnets

From Classes to CIDR

Classful addressing (1981). RFC 791, the Internet Protocol specification of September 1981, read the network size from the first bits of the address: 0 for Class A (7 bits of network, 24 of host), 10 for Class B (14 and 16) and 110 for Class C (21 and 8). RFC 950 (August 1985) standardised subnetting, borrowing host bits behind a mask, and RFC 1112 (August 1989) gave addresses starting 1110 to multicast and kept 1111 reserved.

Running out of Class B. RFC 4632, the current CIDR document (August 2006), tells what went wrong. Class C, at 254 hosts, was too small for most organisations and Class B, at 65,534, far too large, so Class B space was being used up quickly while routing tables grew. The IETF formed the ROAD group in November 1991; its work led to Classless Inter-Domain Routing in RFC 1519 (September 1993), which allows any prefix length and lets routers advertise one aggregate such as 192.168.0.0/16 for many smaller networks.

Ranges with special jobs. RFC 1918 (February 1996) reserved 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks, RFC 3021 (December 2000) allowed /31 prefixes on point-to-point links, and RFC 6598 (April 2012) set aside 100.64.0.0/10 as shared space for carrier-grade NAT. IANA keeps all of these in the IPv4 Special-Purpose Address Registry, with flags for whether each block may be a source or destination, is forwardable and is globally reachable. The calculator uses that registry as last updated on 2025-10-09, plus the multicast block 224.0.0.0/4 from the IANA IPv4 Address Space registry (RFC 5771).

About This Calculator

Reference: Ethernet Cable Categories, Pinouts & PoE.

This page is the site’s IPv4 subnet calculator and CIDR visualizer in one. Give it an address and a prefix length, a dotted subnet mask, a hex mask or a wildcard mask, and it returns the network and broadcast addresses, the usable host range and count, both masks in dotted, binary and hex form, the historical class and the IANA address type with its RFC. The binary view lines up the address, mask, network, wildcard and broadcast bit by bit; the splitter divides the block into equal subnets and marks the one your address is in; the VLSM planner sizes subnets from host counts, largest first, so every block stays aligned.

The maths is exact 32-bit integer arithmetic, so a /0 with 4,294,967,294 hosts is as precise as a /30. Everything runs in your browser and nothing you type is sent anywhere. It is built for network staff, students working through CCNA or Network+ subnetting, and anyone setting up a home or office network. For the background, read Subnetting Explained.

Related tools: IPv4 to IPv6 Converter, IP Lookup, and Number Base Converter.

Frequently Asked Questions

How do I work out the network and broadcast address?

AND the address with the mask for the network, then set every host bit to 1 for the broadcast. For 192.168.10.37/26 the mask is 255.255.255.192, so the last octet steps in blocks of 256 − 192 = 64. 37 falls in the 0–63 block: the network is 192.168.10.0 and the broadcast is 192.168.10.63. In binary the last octet is 00100101 AND 11000000 = 00000000.

Why does a /24 have 254 usable hosts, and what about /31 and /32?

A /24 holds 28 = 256 addresses. The first is the network address and the last is the broadcast, so 254 are left for hosts; a /26 likewise has 64 − 2 = 62. RFC 3021 (2000) lets a /31 on a point-to-point link use both of its 2 addresses, with no broadcast, which saves half the space a /30 (4 addresses, 2 usable) would take. A /32 is one address, used for host routes and loopbacks.

What is a wildcard mask?

The subnet mask with every bit flipped: 255.255.255.192 becomes 0.0.0.63, which is 255.255.255.255 minus the mask. A 0 bit means “must match” and a 1 bit means “ignore”, the reverse of a subnet mask. Cisco access lists and OSPF network statements are written with wildcard masks, so 10.1.2.0 0.0.0.255 matches 10.1.2.0/24. This calculator accepts a wildcard in the mask box and converts it.

Which IP address ranges are private?

RFC 1918 (1996) sets aside 10.0.0.0/8 (16,777,216 addresses), 172.16.0.0/12 (1,048,576) and 192.168.0.0/16 (65,536) for private networks; none of them is globally reachable. RFC 6598 (2012) added 100.64.0.0/10 (4,194,304 addresses) as shared space for carrier-grade NAT between an ISP and its customers. The IANA special-purpose registry also lists loopback 127.0.0.0/8, link-local 169.254.0.0/16 and the three documentation /24s; the calculator names the range your address is in.

What were Class A, B and C networks?

RFC 791 (1981) split IPv4 by its first bits: Class A starts with 0 (first octet 0–127, an 8-bit network), Class B with 10 (128–191, 16-bit network) and Class C with 110 (192–223, 24-bit network). RFC 1112 (1989) made 1110 (224–239) multicast and kept 1111 (240–255) reserved. Classless routing, CIDR (RFC 1519 in 1993, now RFC 4632), replaced the fixed sizes with any prefix length, so a /26 or /20 is normal today. The calculator still shows the class for exam questions.

How do I use the IP Subnet Calculator & CIDR Visualizer?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Home and small-office LANs

192.168.1.100/24 is in network 192.168.1.0 with 254 usable hosts, .1 to .254, and broadcast 192.168.1.255.

Sizing an office network

A /20 such as 172.16.0.0/20 runs from 172.16.0.0 to 172.16.15.255 and gives 4,094 hosts, enough for sixteen /24-sized floors.

VLSM for CCNA labs

Fit 100, 50, 20 and 2 hosts into 192.168.100.0/24 as a /25, /26, /27 and /30: 228 of 256 addresses used, next free block 192.168.100.228.

Cloud VPC planning

Split 10.0.0.0/16 into 256 /24 subnets of 254 usable hosts each, one per tier or availability zone.

Router links

A /30 such as 203.0.113.0/30 gives 2 usable addresses out of 4; a /31 under RFC 3021 gives 2 out of 2.

Access lists and firewall rules

A /26 has wildcard mask 0.0.0.63, so a Cisco ACL entry for 192.168.10.0/26 reads 192.168.10.0 0.0.0.63.

Last updated: