CIDR Calculator & Visualizer
Use this CIDR calculator to turn an IPv4 address and prefix such as 192.168.1.42/24 into the exact network range, subnet mask, broadcast address and usable host count. The 32-bit visualizer makes the network/host boundary visible as you change the prefix.
How to use a CIDR calculator
Enter an IPv4 address, choose a prefix length from /0 through /32, and the calculator derives the canonical network address, broadcast address, subnet mask, wildcard mask, total address count and usable range. You can type a host address rather than the network address; the tool automatically finds the aligned CIDR block that contains it.
CIDR stands for Classless Inter-Domain Routing. A prefix such as /24 means that 24 of the 32 IPv4 bits identify the network. The remaining eight bits identify addresses inside that network. Because eight host bits provide 2⁸ combinations, a /24 contains 256 total addresses.
CIDR example: 192.168.1.42/24
For 192.168.1.42/24, the network is 192.168.1.0/24, the subnet mask is 255.255.255.0 and the broadcast address is 192.168.1.255. Under conventional IPv4 LAN rules, the usable host range is 192.168.1.1 through 192.168.1.254.
Why visualize CIDR instead of only showing a table?
CIDR is fundamentally a bit boundary. Moving from /24 to /25 borrows one host bit for the network, halves the number of addresses in each subnet and creates twice as many equal-size subnets. The visual bit field lets you see that change directly rather than memorizing a chart.
Common CIDR sizes
A /16 contains 65,536 addresses, a /24 contains 256, a /26 contains 64, a /28 contains 16 and a /30 contains 4. A /32 identifies a single IPv4 address. /31 has special point-to-point semantics under RFC 3021.
What this calculator shows
The result panel reports the canonical network address, broadcast address, first and last conventional usable addresses, dotted-decimal subnet mask, wildcard mask, total IPv4 address count and usable-host count. The live 32-bit boundary updates with the CIDR prefix, so the relationship between prefix length, block size and address capacity is visible instead of hidden behind a static table.
How to read the result correctly
The calculator normalizes the IP address you enter to the network block that contains it. That means an input such as 192.168.1.42/24 correctly resolves to network 192.168.1.0/24. For prefixes /0 through /30, conventional IPv4 subnetting reserves the first address as the network identifier and the final address as broadcast. /31 and /32 have different practical semantics, so their address counts should not be interpreted with the ordinary “subtract two” rule.
Related subnet tools
You can also use the subnetting cheat sheet for a complete IPv4 prefix reference, browse individual CIDR prefix pages, try the IPv6 subnet calculator, or return to the main visual subnet calculator.
Frequently asked questions
What is a CIDR calculator?
A CIDR calculator converts an IPv4 address and prefix length into its network address, broadcast address, subnet mask, wildcard mask, IP range and address count.
What does /24 mean in CIDR?
/24 means the first 24 of 32 IPv4 bits are network bits, leaving 8 host bits and 256 total addresses.
Is CIDR the same as a subnet mask?
They describe the same network boundary in different formats. For example, /24 is equivalent to 255.255.255.0.