Subnet Calculator
Enter an IPv4 CIDR like 192.168.1.0/24 and get network, broadcast, first/last usable host, host count, netmask, wildcard mask, and a binary view — /31 and /32 handled correctly.
Accepts CIDR (192.168.1.0/24), IP + netmask (192.168.1.0 255.255.255.0), or a bare IP (treated as /32).
- Network
- 192.168.1.0
- Broadcast
- 192.168.1.255
- First host
- 192.168.1.1
- Last host
- 192.168.1.254
- Usable hosts
- 254
- CIDR
- /24
- Netmask
- 255.255.255.0
- Wildcard
- 0.0.0.255
All calculations run in your browser — nothing is sent to a server.
About the Subnet Calculator
This subnet calculator takes an IPv4 address in CIDR notation — like 192.168.1.0/24 — or an IP paired with a dotted netmask, and instantly derives the network address, broadcast address, first and last usable host, the number of usable hosts, the netmask and its wildcard, plus a binary view of the key addresses. It handles the tricky edge cases correctly: /32 as a single host and /31 as an RFC 3021 point-to-point link with two usable addresses. Everything is computed locally in your browser.
Subnet Calculator features
- 01
CIDR or IP + mask
Accepts 192.168.1.0/24 or 192.168.1.0 255.255.255.0, and even a bare address (treated as /32). It figures out the prefix and validates the mask is contiguous.
- 02
Every derived value
Network, broadcast, first and last usable host, usable host count, netmask, and wildcard mask are laid out at a glance — the numbers you need to plan or troubleshoot a subnet.
- 03
Correct edge cases + binary
/31 links show two usable hosts per RFC 3021 and /32 shows a single host, instead of the misleading zeroes many calculators give. A binary breakdown of network, mask, and broadcast helps you see the boundary.
Subnet Calculator FAQ
- How many usable hosts are in a /24?
- A /24 has 256 total addresses and 254 usable hosts — the first is the network address and the last is the broadcast, both reserved. This calculator shows the usable count for any prefix automatically.
- What is the broadcast address of a subnet?
- It's the last address in the block, formed by setting all host bits to 1. Traffic sent to it reaches every host on the subnet. Enter your CIDR and the broadcast is shown alongside the network address.
- How does a /31 subnet work?
- RFC 3021 defines /31 for point-to-point links: both of its two addresses are usable, with no separate network or broadcast address. This tool reflects that, showing two usable hosts rather than zero.
- What is a wildcard mask?
- A wildcard mask is the bitwise inverse of the netmask (for /24 it's 0.0.0.255). It's used in ACLs and routing configs on Cisco-style devices to indicate which bits can vary. The calculator shows it next to the netmask.
- How do I convert CIDR to a subnet mask?
- Enter the CIDR prefix (say /26) and the tool displays the equivalent dotted-decimal netmask (255.255.255.192) along with all other subnet details. No lookup table needed.
Related tools
Developer →- Live
Regex tester
Test JavaScript regular expressions against any text — see matches, capture groups, and replacements live, in your browser.
DeveloperFreeRuns locallyOpen - Live
Diff viewer
Compare two pieces of text side by side — line, word, or character diff — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
Lorem ipsum generator
Generate placeholder text — paragraphs, sentences, or words — instantly, with optional HTML tags.
DeveloperFreeRuns locallyOpen
Explore other tools
All tools →- Live
PDF to Word
Convert a PDF into an editable Word (.docx) document in your browser. Extracts the text into a Word file you can open and edit in Word, Google Docs, or Pages.
PDFFreeRuns locallyOpen - Live
Rotate image
Rotate or flip an image in 90° steps or at any angle — fast, free, in your browser.
ImageFreeRuns locallyOpen - Live
MP4 to MP3
Extract the audio track from an MP4 video as an MP3 in your browser — files never leave your device.
VideoFreeRuns locallyOpen - Live
OGG to MP3
Convert OGG Vorbis audio to universally compatible MP3 in your browser — files never leave your device.
AudioFreeRuns locallyOpen - Live
CSV to JSON
Convert CSV rows into JSON objects.
DocumentFreeRuns locallyOpen