IPv4 Subnet Calculator (CIDR)
What is IPv4 Subnet Calculator (CIDR)
A subnet calculator takes an IPv4 address and a CIDR prefix (like /24) or a dotted-decimal subnet mask, then works out everything the network implies: the network address, the broadcast address, the range of usable host addresses, the total and usable host counts, the wildcard mask, and the mask itself in both decimal and binary. It runs entirely in your browser, so no address you type ever leaves your device.
How to use
- Enter an IPv4 address such as 192.168.1.10 in the first field.
- Type a CIDR prefix like 24 or a full subnet mask like 255.255.255.0 in the second field.
- Read the network address, broadcast, and first and last usable hosts as they update instantly.
- Use Copy all to grab the full breakdown, or Share to send the exact calculation to someone else.
When to use it
Planning a home lab and not sure how many devices fit in 192.168.1.0/24? Enter it and you will see 254 usable hosts, from 192.168.1.1 to 192.168.1.254, with a broadcast at 192.168.1.255. Splitting an office network into smaller /26 blocks or double-checking a firewall rule works the same way: type the address and prefix, and the ranges appear before you commit anything to a router.
Frequently asked questions
What is a CIDR prefix?
CIDR notation writes a subnet as an address followed by a slash and a number, like /24. That number is how many bits from the left are fixed as the network portion. A /24 fixes the first 24 bits, leaving 8 bits (256 addresses) for hosts.
Why are there fewer usable hosts than total addresses?
In a normal subnet the first address is the network identifier and the last is the broadcast address, so both are reserved. A /24 has 256 total addresses but 254 usable ones. The exceptions are /31 point-to-point links, where both addresses are usable, and /32, which is a single host.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask marks the network bits with ones (255.255.255.0). A wildcard mask is its inverse, marking the host bits with ones (0.0.0.255). Wildcard masks appear in access control lists on Cisco and similar gear.
Can I enter a subnet mask instead of a CIDR prefix?
Yes. You can type either 24 or 255.255.255.0 in the mask field. The calculator converts a valid contiguous mask to its prefix automatically and rejects a non-contiguous one such as 255.0.255.0.
Can I share this tool with my inputs pre-filled?
Yes. The URL updates automatically as you type. Copy it from the address bar or use the Share button, and anyone who opens the link will see your exact inputs ready to go.
Related tools
Aspect Ratio Calculator
Calculate aspect ratios, find a missing width or height, and resize images or video while keeping the same proportions. Free and instant.
Base64 Decoder
Decode Base64 strings to plain text instantly in your browser. Supports full Unicode output including emojis. Free online Base64 decoder.
Base64 Encoder
Encode any text to Base64 instantly in your browser. Supports Unicode, emojis and special characters. Free online Base64 encoder.