Category: Developer tools
Subnet Calculator
Enter one IPv4 address and CIDR prefix to read masks, range and hosts
Type an IPv4 address such as 192.168.1.10/24 and read the subnet mask, wildcard mask, network and broadcast address, host range and host counts, all locally.
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
This subnet calculator needs a single field: a dotted-quad IPv4 address with an optional CIDR prefix, for example 192.168.1.10/24. Leave the slash off and /24 is assumed. Each of the four parts is one to three digits and no greater than 255, and the prefix runs from 0 to 32. The tool echoes the prefix as /n and derives the subnet mask, the wildcard mask as the bitwise complement of that mask, the network address as the address AND the mask, the broadcast address as the network OR the wildcard, the first and last host address of the range, the total address count as 2 to the power of (32 minus the prefix), and the usable host count as that total minus two, floored at zero. The small prefixes follow their own rules: /32 reports one usable address, and /31 reports two, with the first host at the network address and the last host at the broadcast address. Results update on every keystroke, one button refills the sample 192.168.1.10/24 and another clears the field, and a single message appears when the field is empty or the address or prefix cannot be parsed. IPv6 is not accepted. There is no VLSM planning or subnet splitting, no list of individual hosts, no private, public, loopback, multicast or class A/B/C labelling, no WHOIS, ASN, reverse DNS or geolocation lookup, no range-to-CIDR conversion in either direction, no binary or hexadecimal rendering, and no supernetting or overlap check. Address and host counts are always grouped with English thousands separators, and there is no copy button, history, export or download. Everything is arithmetic performed in the page, so no service is contacted at run time.
How to use it
- Type an IPv4 address with an optional CIDR prefix; without a slash the tool assumes /24.
- Read the subnet mask, wildcard mask, network address, broadcast address and the first and last host.
- Check the total address count and usable hosts, remembering the separate /31 and /32 rules.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- What is CIDR notation?
- The slash and number after an address give the prefix length, the count of leading bits that identify the network. This tool reads that prefix and assumes /24 when you omit it.
- How many usable hosts are in a /24?
- A /24 holds 256 addresses and 254 usable hosts. Both the total and the usable count are shown side by side for whatever prefix you enter.
- Why are there fewer usable hosts than total addresses?
- The network address and the broadcast address are not assignable, so the usable count is the total minus two, floored at zero.
- What is the difference between a netmask and a wildcard mask?
- The subnet mask marks the network bits; the wildcard mask is its bitwise complement and marks the host bits. Both are shown in dotted-quad form.
- How are /31 and /32 handled?
- A /32 reports one usable address. A /31 reports two, with the first host at the network address and the last host at the broadcast address, which matches point-to-point use.