IP Subnet Calculator
IP Subnet Calculator
CIDR network · network address · broadcast · usable host range
How to Use
📖 Tool Introduction
The IP Subnet Calculator is one of the most frequently used utilities that network engineers, operations staff and computer-science students reach for whenever they need to plan an IPv4 range. Give it any IPv4 address together with a prefix length in CIDR notation, and the tool immediately derives, entirely in your browser using 32-bit integer bitwise AND, OR and complement operations, every parameter you need to describe the resulting subnet: the network address, the subnet mask, the broadcast address, the first and last usable host addresses, and the total number of usable hosts. Unlike online subnet services that send your input to a remote server, this calculator runs fully offline, so the addresses you type never leave your device. That matters when you are examining real production topologies, because it means you can explore internal ranges, split subnets and sanity-check device configurations without leaking sensitive addressing information to any third party. The interface offers three convenient input paths: a dotted-quad IP field, a numeric prefix field, and a slider. You can either type something like 192.168.1.10 and then pick a prefix separately, or paste a complete CIDR string such as 10.0.5.7/28 and let the tool split it automatically. The output is presented as six information cards plus a visual range bar, where the network address is drawn in gray, the usable host interval in blue, and the broadcast address in orange, so the layout of the whole subnet becomes visible at a glance. The UI is available in Simplified Chinese, Traditional Chinese and English, follows the website theme and dark mode automatically, and collapses gracefully to a single column on narrow phone screens. Because every computation is local, results appear within milliseconds of a click, and you never have to wait for a network round trip, which makes the tool especially pleasant to use while pacing through a long addressing worksheet on paper.
✨ Key Features
- Exact bitwise derivation: the mask is built by shifting 0FFFFFFF left by 32 minus the prefix, the network address is IP AND mask, and the broadcast is network OR the inverse mask, matching what Cisco and Huawei devices print on the command line
- Six result cards: network address with CIDR notation, broadcast address, usable host range, usable host count, dotted mask and its hex form, plus address class and public or private scope
- Smart scope detection: automatically recognizes RFC1918 private ranges, loopback, link-local, multicast and reserved addresses
- Boundary-aware prefix handling: /31 is treated as a point-to-point RFC3021 link and /32 as a host route, so the classic minus-two rule is not applied mechanically
- Visual range bar: a three-color strip shows at a glance where the network, usable hosts and broadcast address sit inside the range
- Copy and download: structured results can be copied to the clipboard or saved as a text file for documents, tickets and configuration scripts
📝 How to Use
- Type a valid IPv4 address into the IP field, for example 192.168.1.10
- Enter a prefix between 0 and 32 in the prefix field, or drag the slider to pick one quickly
- Alternatively, type a full CIDR string such as 172.16.5.7/28 directly in the IP field and the tool splits it for you
- Click the Calculate button to refresh all six cards and the range bar
- Click Copy result to put the structured output on the clipboard, or Download to save it as a text file
⚠️ Notes
- Valid addresses only: each dotted quad must be an integer from 0 to 255 and there must be exactly four octets; empty or malformed input triggers a friendly message instead of a crash
- Prefix range: the prefix must be an integer between 0 and 32, and out-of-range values produce a clear warning
- Pure calculation: this tool never pings an address and never opens a network connection, so every operation happens on your own machine
- Legacy classes: the A/B/C/D/E class label is kept as a historical reference; modern networks rely on CIDR rather than address classes
- Scope judgment: public versus private detection follows common reserved-range rules; always defer to the latest IANA allocations for special experimental blocks