Productivity and Utilities

IPv4 Subnet Calculator

Get the network address, broadcast address, usable host range and mask for any IPv4 address and prefix length.

Your numbers

Four numbers from 0 to 255 separated by dots. You can also type the address with a slash, such as 10.0.0.5/20.

A prefix such as 24 or /24, or a dotted mask such as 255.255.255.0.

More options

Leave blank to skip. Must be longer than the prefix above, up to 32.

Result

192.168.1.130/26 belongs to

192.168.1.128/26

62 usable hosts

Network address
192.168.1.128
Broadcast address
192.168.1.191
First usable host
192.168.1.129
Last usable host
192.168.1.190
Usable hosts
62
Total addresses
64
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
Address type
Private (RFC 1918)
Classful class
C
Mask in binary
11111111.11111111.11111111.11000000
How this was calculated
  1. Mask for /26: 26 one bits then 6 zero bits = 255.255.255.192.
  2. Network address = address AND mask = 192.168.1.130 AND 255.255.255.192 = 192.168.1.128.
  3. Broadcast address = network OR wildcard = 192.168.1.128 OR 0.0.0.63 = 192.168.1.191.
  4. Total addresses = 2^6 = 64; usable hosts = 64 - 2 = 62.

Next step

How to use the ipv4 subnet calculator

  1. Enter an IPv4 address such as 192.168.1.130. You can also type it with a slash, such as 10.0.0.5/20, and leave the mask box blank.
  2. Enter the prefix length (24 or /24) or a dotted subnet mask such as 255.255.255.0.
  3. Optionally open the advanced field and enter a longer prefix, such as 28, to split the subnet into equal smaller ones.
  4. Read the network address, broadcast address, first and last usable host, host counts, masks and address type. Use Copy result, CSV or Print to keep them.

Formula

mask = first N bits set to 1, remaining 32 - N bits set to 0

network = address AND mask

broadcast = network OR wildcard, where wildcard = NOT mask

total addresses = 2^(32 - N); usable hosts = total - 2 (for /30 or shorter)

N is the prefix length. A /31 has two usable addresses and a /32 is a single host. The calculation works on 32-bit whole numbers, one bit at a time.

192.168.1.130/26

A /26 mask has 26 one bits, which is 255.255.255.192, with a wildcard of 0.0.0.63. ANDing 192.168.1.130 with the mask gives the network address 192.168.1.128. ORing the network with the wildcard gives the broadcast address 192.168.1.191.

The block holds 2^6 = 64 addresses, so there are 62 usable hosts, from 192.168.1.129 to 192.168.1.190. Splitting it into /28 subnets gives four blocks that start at 192.168.1.128, .144, .160 and .176, each with 14 usable hosts. The address is in private space (RFC 1918).

Reading the results

The network address is the first address in the block and names the subnet. The broadcast address is the last and is used to reach every host on the subnet at once. Everything in between, from the first usable host to the last usable host, can be assigned to devices. The wildcard mask is the mask turned inside out, a form used in some router access lists.

Two special cases break the usual rule of subtracting two. A /31 has just two addresses and, under RFC 3021, both are usable on a point-to-point link. A /32 is a single address, so network, broadcast and host are all the same. A /0 covers the entire IPv4 space.

Address type and class

The address type says whether the address falls in a well-known special range: private space from RFC 1918 (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16), loopback (127.0.0.0/8), link-local (169.254.0.0/16), shared address space for carrier-grade NAT (100.64.0.0/10), multicast, or reserved. Anything else is labeled public. This is a lookup in a short list, not a check of who owns the address.

The classful class (A, B, C, D or E) comes from the first number and is shown only for reference. Modern networks use classless CIDR notation, where the prefix length alone decides the size of a subnet.

Splitting a network

To divide a subnet, enter a longer prefix than the one you started with. Each extra bit doubles the number of subnets and halves their size. The table lists up to 64 subnets with their first and last host and broadcast address, and the CSV export includes the same rows. The page says how many exist in total when there are more.

What this calculator does not do

It covers IPv4 only. It does not check whether an address is in use, route traffic, or plan variable length subnetting for you. Addresses are entered with plain numbers and no leading zeros, because some tools read a leading zero as octal. Everything is computed in your browser.

Assumptions and limits

  • IPv4 only. IPv6 addresses are not supported.
  • The address is four decimal numbers from 0 to 255 without leading zeros.
  • A dotted mask must be a run of ones followed by zeros. Masks such as 255.0.255.0 are rejected.
  • Usable hosts exclude the network and broadcast addresses, except for /31 (two usable) and /32 (one).
  • Address type is based on a short list of well-known special-use ranges.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How many hosts are in a /24 network?

A /24 has 256 addresses. Two are reserved for the network and broadcast addresses, so 254 are usable for devices, for example 192.168.1.1 to 192.168.1.254 in the block 192.168.1.0/24.

What is the difference between a subnet mask and a wildcard mask?

The wildcard mask is the subnet mask with every bit flipped. For 255.255.255.192 the wildcard is 0.0.0.63. Subnet masks mark the network part, while wildcard masks, used in some firewall and router rules, mark the part that can vary.

What does CIDR notation like /26 mean?

The number after the slash is how many of the 32 address bits belong to the network. A /26 means 26 network bits and 6 host bits, which gives 64 addresses and the dotted mask 255.255.255.192.

Why does a /31 show two usable hosts instead of zero?

RFC 3021 allows a /31 on point-to-point links, so no addresses are lost to network and broadcast. The calculator follows that rule and notes it in the results.

Can I use this to split one network into smaller subnets?

Yes. Open the advanced field, enter a longer prefix such as 28, and the table lists each smaller subnet. For related number tools see the ratio calculator and the unit converter.