Subnet Calculator
Calculate IPv4 network address, broadcast, usable host range, host count, wildcard mask and CIDR/mask conversions from an address and prefix. Runs entirely in your browser.
๐ Runs entirely in your browser โ nothing is uploadedWhat the subnet calculator does
This Subnet Calculator takes an IPv4 address together with a network size โ written either as a CIDR prefix length (for example /24) or as a dotted-decimal subnet mask (for example 255.255.255.0) โ and derives every value you usually need when planning or troubleshooting a network. It computes the network (subnet) address, the broadcast address, the first and last usable host addresses, the total number of addresses and the number of usable hosts, the wildcard mask used in access control lists, and the equivalent mask in both notations. It also shows the IP class and whether the address falls in a private range.
How the math works
An IPv4 address is 32 bits. The prefix length tells you how many leading bits identify the network; the remaining bits identify hosts. The calculator converts the address and mask to 32-bit integers, applies a bitwise AND to find the network address, and ORs in the inverted mask (the wildcard) to find the broadcast address. Usable hosts normally run from network + 1 to broadcast โ 1, giving 2^(32 โ prefix) โ 2 addresses. Two special cases are handled per the standards: a /31 behaves as an RFC 3021 point-to-point link with two usable addresses and no broadcast, and a /32 is a single-host route. Because the work is pure integer arithmetic, results are exact and instant.
Practical uses
Network administrators use subnet calculations constantly: carving an office network into VLANs, sizing a DHCP scope, writing firewall and ACL rules with wildcard masks, validating a static route, or simply confirming which broadcast address a host will use. Students learning CIDR can experiment with different prefixes to see how the usable host count halves with each added network bit. Everything here runs locally in your browser with no uploads and no external API calls, so you can safely test internal addressing plans without exposing them. As always, verify the output against your actual device configuration before relying on it for production changes.
How to use
- Enter an IPv4 addressType a dotted-quad address such as 192.168.1.10.
- Choose a prefix or maskEnter a CIDR prefix like 24, or a subnet mask like 255.255.255.0.
- Read the resultsSee the network, broadcast, usable host range, host count, wildcard and mask conversions.