Calculate one IPv4 or IPv6 subnet
The subnet calculator runs in this browser after the page loads. Your input is not submitted to a calculation API, and the tool does not scan the proposed range. This makes it suitable for private address planning. Loading the website still uses a network connection; local arithmetic does not mean the whole website works offline.
Enter an address followed by a slash and a prefix length, then select Calculate. You can start with a host address; the calculator finds the network containing it. For IPv4, prefixes run from /0 through /32. IPv6 accepts /0 through /128. Examples fill the input without changing a device or contacting the address.
Read more
An IPv4 dotted mask also works: 192.168.1.10/255.255.255.0 means the same network as 192.168.1.10/24. Masks must have consecutive network bits followed by host bits. A pattern such as 255.0.255.0 is rejected rather than interpreted as a normal subnet. IPv6 uses a prefix length; it does not use the IPv4 dotted-mask format.
Start with a planning question
Use this subnet calculator when you need boundaries, a mask, or an exact address count for one block. If you need to divide a parent into children, combine several networks, or convert arbitrary endpoints into blocks, open the CIDR calculator. Those operations require additional constraints beyond the properties of a single subnet.
For example, 192.168.1.10/24 belongs to 192.168.1.0/24. The mathematical interval runs from 192.168.1.0 to 192.168.1.255 and contains 256 address values. Changing the prefix to /25 halves the block to 128 values. The entered address determines which half contains the result.
Understand boundaries, counts and the bit diagram
The subnet calculator first identifies the normalized network. Normalization clears host bits; it does not announce that your computer changed its address. The first and last address fields describe the entire mathematical interval. The colored bar shows the actual proportion of network bits and host bits in a 32-bit IPv4 or 128-bit IPv6 address.
Read more
Each remaining host bit doubles the number of address values. A /24 IPv4 network leaves eight host bits, so its total is two to the eighth power, or 256. A /64 IPv6 prefix leaves 64 host bits. Its total is 18446744073709551616, displayed exactly rather than rounded through floating-point arithmetic.
The subnet mask sets network bits to one and host bits to zero. The IPv4 wildcard reverses those bits: /24 has mask 255.255.255.0 and wildcard 0.0.0.255. Some access-control systems use wildcard syntax, while others require a mask or prefix. Confirm the destination field before copying any value.
Total addresses are not a device inventory
For conventional IPv4 subnets through /30, the network and directed-broadcast addresses are excluded from the host count. A /24 therefore has 254 conventional host addresses. The displayed first and last host addresses reflect that convention, while the full-range fields still include both boundary values.
A gateway, static reservation, printer and DHCP client each use space within your allocation. The tool does not subtract these operational choices or discover which addresses are occupied. If you plan 254 clients plus a separate gateway, a conventional /24 does not provide enough host addresses for that arrangement.
Exceptional prefixes require context
An IPv4 /31 contains two values. Under the RFC 3021 point-to-point convention, both may be endpoints; this calculator reports two rather than subtracting two. Check that your equipment and link support that use. A /32 represents one address, commonly a host route, without a separate broadcast address.
IPv6 does not use IPv4-style broadcast. Its conventional IPv4 usable-host count and wildcard fields are therefore omitted. A mathematical first or last value is not a recommendation to assign it. Address architecture, reservations and configuration methods determine which values belong in your operational plan. Inter-router /127 use is described in RFC 6164.
Apply the result without confusing calculation and observation
A valid range does not establish ownership, reachability or permission to use it. Private and documentation addresses are legitimate arithmetic inputs but do not become public allocations. For a public network's registered holder, use IP lookup; for a route's observed origin, use ASN lookup. Neither replaces an internal address inventory.
Read more
Before adding a network, compare it with existing LANs, VPN pools, container ranges and remote sites. Two locations may independently use the same private prefix until a connecting tunnel makes the overlap troublesome. Check both boundaries and prefix alignment rather than relying on different labels in a spreadsheet.
Rejecting ambiguous input is deliberate. Use four decimal IPv4 octets or ordinary IPv6 notation. URLs, ports, abbreviated IPv4, octal-looking values and zone identifiers are not accepted. For IPv4-mapped IPv6 addresses, enter the equivalent IPv4 address and its IPv4 prefix explicitly so the address family stays clear.
For a worked derivation, read CIDR notation explained. RFC 4632 describes CIDR's routing model. Copying a report preserves the arithmetic and its conventions; successful deployment still requires checking the target device's documentation, existing configuration and allocation plan.