# IP subnet calculator > How many addresses are in your subnet? Work out the network, mask, range and host count of an IPv4 or IPv6 block, and split it into smaller subnets. Calculate the network address, netmask, broadcast, host range and address count of any IPv4 or IPv6 CIDR block, and split it into smaller subnets. - Page: https://how.box/subnet/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/subnet/?cidr={cidr}&split={split} - `cidr` (text): The address with its prefix length or mask. Example: `192.168.1.10/24`. - `split` (whole number 0 to 128): Prefix length of the subnets to split into; 0 for no split. Example: `26`. Example answer: https://how.box/subnet/?cidr=192.168.1.10%2F24&split=26 The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `subnet_calculate`: Calculates an IPv4 or IPv6 subnet from CIDR notation (RFC 4632; /31 as in RFC 3021; IPv6 text as in RFC 5952). - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"subnet_calculate","arguments":{"cidr":"192.168.1.10/24","split_prefix":26}}}` - GET: https://how.box/mcp/run/subnet_calculate?cidr=192.168.1.10%2F24&split_prefix=26 ## How it works An IP address has a network part and a host part. The prefix length after the slash says how many leading bits belong to the network: /24 means the first 24 of an IPv4 address's 32 bits. The rest number the hosts inside it (CIDR, RFC 4632). A block of prefix length p holds 2^(32 − p) IPv4 addresses, or 2^(128 − p) IPv6 addresses. In IPv4 the first address names the network and the last is the broadcast address, so a /24 has 2^8 − 2 = 254 usable hosts. A /31 is a two-address link where both are hosts (RFC 3021), and a /32 is one host. IPv6 has no broadcast address. Splitting a /24 into /26 subnets makes 2^(26 − 24) = 4 blocks of 64 addresses. The tool shows IPv6 addresses in the short form of RFC 5952. It does not know your routers: reserved addresses such as a gateway are for you to subtract. ## FAQ **How many hosts are in a /24?** 256 addresses, of which 254 can be given to hosts: the first is the network address and the last the broadcast address. **What is the subnet mask of /26?** 255.255.255.192. It has 26 one-bits, and the block holds 64 addresses. **What is a wildcard mask?** The mask with every bit flipped, such as 0.0.0.255 for /24. Some router and firewall rules use it instead of the netmask. **Why can a /31 have two hosts?** On a point-to-point link there is nobody to broadcast to, so RFC 3021 lets both addresses be hosts. **Is 192.168.1.0 a private address?** Yes. 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks (RFC 1918); the tool names the range of what you enter. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)