Subnet calculator

The subnet calculator takes an IPv4 address with a prefix or a netmask, calculates the network address, the broadcast address, and the usable address range, and divides the network into subnets.
Input
Enter an address with a prefix, such as 192.168.1.10/24, an address and a netmask separated by a space, such as 192.168.1.10 255.255.255.0, or an address only and choose a prefix from the list. Do not add leading zeros, such as 010.
Calculation complete.
Network details
  1. IP address in binary
    11000000.10101000.00000001.00001010
  2. Netmask in binary
    11111111.11111111.11111111.00000000
In binary, the network part is in bold and the host part is set off by a line.
Subnet division

Subnet division runs in the browser. Please enable JavaScript.

    Everything runs in your browser; nothing is sent or stored.

    • Enter an address with a prefix, such as 192.168.1.10/24, or an address and a netmask separated by a space.
    • For an address without a prefix, choose a prefix from the "Prefix and netmask" list. Your choice also updates the address field.
    • The "Network details" section also shows the netmask, the wildcard mask, the number of addresses, and the address type.
    • It also shows the address in binary, as an integer, in hex, and as a reverse DNS name.
    • In the "Subnet division" section, choose a longer prefix to get the list of subnets and the address range of each subnet.
    • Copy any value with the "Copy" button, and the list of subnets with the "Copy list" button.

    CIDR prefix and netmask

    An IPv4 address has 32 bits, written as four numbers from 0 to 255 separated by dots. The prefix in CIDR notation, such as /24, states how many bits from the left belong to the network part, and the remaining bits belong to the host part. The netmask shows the same information in decimal form: the prefix /24 equals the mask 255.255.255.0. The wildcard mask is the inverse of the netmask, such as 0.0.0.255, and is used in router access control lists (ACLs). The number of addresses in a network is 2 to the power of the number of host bits: a /26 network leaves 6 host bits, so it has 64 addresses.

    Network address, broadcast address, and usable addresses

    The first address in a network, where all the host bits are 0, is the network address, and the last address, where all the host bits are 1, is the broadcast address. Neither address is assigned to a device, so the number of usable addresses is 2 less than the number of addresses in the network. In the 192.168.1.0/24 network, the usable addresses are 192.168.1.1 to 192.168.1.254, and the first one is usually assigned to the router. In a /31 network, used for a point-to-point link between two routers under RFC 3021, both addresses are usable and there is no broadcast address. A /32 network represents the single address of one host.

    Private addresses and reserved ranges

    The ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are defined as private in RFC 1918 and are used in internal home and office networks. A private address is not routed on the internet, and devices reach the internet through a public address using NAT. Internet service providers use the 100.64.0.0/10 range for CGNAT addresses, and a device that did not get an address from DHCP assigns itself an address in the 169.254.0.0/16 range. The ranges 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are reserved for documentation and examples.

    Common prefixes

    • /32 (255.255.255.255)1 address.
    • /31 (255.255.255.254)2 addresses, both usable on a link between two routers.
    • /30 (255.255.255.252)4 addresses, 2 of them usable.
    • /29 (255.255.255.248)8 addresses, 6 of them usable.
    • /28 (255.255.255.240)16 addresses, 14 of them usable.
    • /27 (255.255.255.224)32 addresses, 30 of them usable.
    • /26 (255.255.255.192)64 addresses, 62 of them usable.
    • /25 (255.255.255.128)128 addresses, 126 of them usable.
    • /24 (255.255.255.0)256 addresses, 254 of them usable.
    • /22 (255.255.252.0)1,024 addresses, 1,022 of them usable.
    • /16 (255.255.0.0)65,536 addresses, 65,534 of them usable.
    • /8 (255.0.0.0)16,777,216 addresses, 16,777,214 of them usable.
    Did you know?

    With our firewall and VPN service, our team sets up firewall rules on the external firewall on request, to open and block ports and IP addresses.

    Firewall and VPN

    Subnet calculator FAQ

    Which prefix fits a network of 50 devices?

    A network of 50 devices needs at least 50 usable addresses, so the right prefix is /26, which has 62 usable addresses. The /27 prefix has only 30 usable addresses, so it is not enough. It is a good idea to leave spare addresses for more devices in the future.

    Can I enter an address that is not the network address?

    Yes. You can enter any address in the network, and the calculator works out the network that the address belongs to. For example, for the address 192.168.1.130/26, the network address is 192.168.1.128 and the broadcast address is 192.168.1.191. The address type is shown for the address you entered.

    Why do I see a message about a leading zero in the address?

    The message appears when one of the parts of the address starts with 0, such as 192.168.010.1. Some systems read a value with a leading zero as an octal number, so 010 is read as 8. Enter the address without leading zeros.

    Why do I see a message that the netmask is not contiguous?

    In a valid netmask, all the 1 bits come first from the left, before all the 0 bits. A mask such as 255.0.255.0 is not valid, because in binary, 1 bits appear after 0 bits. Each part of a valid mask is one of the values 255, 254, 252, 248, 240, 224, 192, 128, or 0, and every part after a part that is not 255 is 0.

    Why does subnet division show only the number of subnets?

    The list of subnets is shown only when the division creates up to 256 subnets. When it creates more, only the number of subnets and the number of addresses in each subnet are shown. For example, dividing a /16 network into /25 networks creates 512 subnets of 128 addresses each.

    Does the calculator support IPv6 addresses?

    No. The subnet calculator works with IPv4 addresses only. For IPv6 addresses and networks, you can use the IPv6 calculator.

    Shopping cart

    Your cart is emptyYou can start with one of our popular plans.

    Site search

    Accessibility

    Text size
    100%
    Accessibility statement