Skip to content

← All tools

Free online tool

Subnet calculator

Type an address with a prefix, a mask or a wildcard. You get the network, broadcast, host range and the binary behind them, plus subnet splitting, a VLSM planner and IPv6 prefixes. Everything is worked out in your browser; nothing you type is sent anywhere.

Accepts 192.168.1.77/24, 192.168.1.77 255.255.255.0, 192.168.1.77 0.0.0.255, a bare address, or an IPv6 prefix like 2001:db8::/48.

Try

Result

Network address
192.168.1.0/24
Broadcast address
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Total addresses
256
Usable hosts
254
Class (historical)
Class C
Address type
Private (RFC 1918)
  • 192.168.1.77 is not the first address of its block. It belongs to the network 192.168.1.0/24.

Binary view

Address11000000.10101000.00000001.01001101

Mask11111111.11111111.11111111.00000000

Cyan bits are the network part, grey bits are the host part.

CIDR, mask and host count converter

Enter any one of them and get the others.

Prefix
/26
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
Total addresses
64
Usable hosts
62

Split into subnets

Splits the network from the box above into equal subnets (IPv4).

4 subnets of /26, 64 addresses each.

#SubnetFirst usable hostLast usable hostBroadcast addressUsable hosts
1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.6362
2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.12762
3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.19162
4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.25562

VLSM: subnets of different sizes

Give the number of hosts each subnet needs. The largest is placed first, so every block lines up on its boundary.

Uses 228 of 256 addresses. 28 left, starting at 192.168.1.228.

Hosts neededSubnetSubnet maskFirst usable hostLast usable hostBroadcast addressUsable hosts
100192.168.1.0/25255.255.255.128192.168.1.1192.168.1.126192.168.1.127126
50192.168.1.128/26255.255.255.192192.168.1.129192.168.1.190192.168.1.19162
20192.168.1.192/27255.255.255.224192.168.1.193192.168.1.222192.168.1.22330
2192.168.1.224/30255.255.255.252192.168.1.225192.168.1.226192.168.1.2272

How the numbers are worked out

  • •A prefix like /24 says how many leading bits name the network. The rest name hosts, so a /24 has 2^8 = 256 addresses. The mask is the same prefix written as four numbers, and the wildcard is the mask turned inside out (used by router access lists).
  • •Normally the first address is the network and the last is the broadcast, so usable hosts are the total minus 2. Two exceptions are handled: a /31 has two usable addresses for point-to-point links (RFC 3021), and a /32 is a single address.
  • •If you type a host address such as 192.168.1.77/24, the tool shows the network it belongs to (192.168.1.0/24) and says so.
  • •VLSM gives each subnet the smallest power-of-two block that holds the hosts you asked for plus its network and broadcast address, and places the biggest first so each block sits on its boundary. Splitting into equal subnets rounds the count up to a power of two.
  • •Address types come from the IANA special-purpose address lists. IPv4 classes A to E are shown only as history: routing has used CIDR instead since the 1990s. IPv6 uses BigInt maths, and text follows RFC 5952 (lower case, longest run of zeros shortened to ::).

Questions

How many usable hosts does a /24 have?
254. A /24 holds 256 addresses; the network address and the broadcast address are not given to hosts. A /31 is the exception with 2 usable addresses, and a /32 is a single address.
What is the difference between a subnet mask and a wildcard mask?
They are the same bits flipped. 255.255.255.0 is the mask for a /24 and 0.0.0.255 is its wildcard. Routers use masks for interface addresses and wildcards in access lists and OSPF network statements. This tool accepts either one.
Does the "public" label mean the address is in use?
No. It only means the address is not in one of the IANA special-purpose ranges such as private, loopback, link-local, shared (100.64.0.0/10), documentation or multicast. It does not say whether the address is assigned to anyone or routed on the internet.
Is my input sent to a server?
No. The page does the arithmetic in your browser with no network request for your data, so it also works offline once loaded.

Related