Subnet calculator

Enter an IP address with a mask or CIDR prefix, like 192.168.1.10/24. You get the network address, broadcast, host range, host count, mask, wildcard and binary view. Split the network into subnets or check whether an address belongs to it.

Works with IPv4 and IPv6 (/48, /56, /64). Everything is calculated in your browser, and no address leaves your device.

Use an address from your router, server or cloud console. Type the mask after a slash, after a space (255.255.255.0), or pick it from the list.

For example: 10.0.0.1/8, 172.16.5.4 255.255.240.0, 2001:db8::/48. Results update as you type.

Examples:

What goes to the server: nothing. The calculator runs in your browser. The addresses you enter aren't sent anywhere and are hidden from analytics.

What the calculator shows

Everything you need to plan addresses for a LAN, a VPN or a cloud VPC.

Network and range

Network address, broadcast, first and last host, address count, subnet mask and wildcard for ACLs.

Subnetting and VLSM

Split a network into N equal subnets or fit subnets to the number of hosts each one needs.

IPv6

/48, /56, /64 and any other prefix: range, full notation, number of /64 subnets, ip6.arpa zone.

WireGuard and routes

Ready-to-paste AllowedIPs lines and static route commands for Linux, Windows, MikroTik and Cisco.

When it helps

Home network

See how many devices fit in your router's network and which range to give DHCP.

Office and branches

Carve out ranges for departments, cameras and guest Wi-Fi without overlaps.

Site-to-site VPN

Make sure office networks don't overlap and write AllowedIPs for the tunnel.

Cloud and servers

Plan a VPC and its subnets, and check whether an IP matches a firewall rule.

How subnet masks and CIDR prefixes work

An IPv4 address is 32 bits. The mask says how many leading bits belong to the network: a /24 uses 24 bits, mask 255.255.255.0, which leaves 8 host bits, or 256 addresses. The first is the network address and the last is broadcast, so 254 are usable.

A wildcard mask is the inverse, 0.0.0.255 for a /24. Cisco ACLs and OSPF use it.

/31 and /32 subnets

A /31 has two addresses and links two routers point-to-point. Under RFC 3021 both are usable, with no network or broadcast address. A /32 is a single address, used for a route to one host.

IPv6 subnets: /48, /56 and /64

In IPv6 a standard subnet is a /64 with 2^64 addresses. ISPs assign customers a /56 (256 /64 subnets) or a /48 (65,536 /64 subnets), which the customer splits into networks. IPv6 has no broadcast; multicast replaces it.

Subnet calculator FAQ

Enter an IP with its mask, like 192.168.1.10/24. Setting all host bits to 0 gives the network address (192.168.1.0), and setting them to 1 gives broadcast (192.168.1.255). The calculator shows both and the host range in between.

A /24 has 256 addresses and 254 hosts, a /26 has 64 and 62, a /30 has 4 and 2. The formula is 2 to the power of (32 − prefix), minus two for network and broadcast. The exceptions are /31 (2 hosts) and /32 (1 address).

It's the subnet mask inverted: where the mask has ones, the wildcard has zeros. For 255.255.255.0 the wildcard is 0.0.0.255. Cisco ACLs and OSPF use it.

Open the “Split network” tab. Enter a number of subnets, a new prefix length, or a list of names and host counts (VLSM). The calculator places subnets from largest to smallest without overlaps and shows what's left free.

Enter the network, open “Is IP in subnet” and paste one or more addresses. Each one is marked “in subnet” or “not in subnet”.

To route only the remote office network through the tunnel, list its CIDR, like 10.20.0.0/24. To route everything except one network, you need a list of CIDR blocks without it. The “WireGuard & routes” tab builds that list.

Enter an address with a prefix, like 2001:db8:abcd::/48. You'll see the range, full notation, number of /64 subnets and the reverse DNS zone. Split a /48 into /56 or /64 on the “Split network” tab.

No. The calculator runs in your browser. The page sends no addresses anywhere, and they're hidden from analytics.