Skip to content
DoItJag

IPv4 Subnet Calculator

Type an IPv4 address and pick a mask, or paste it in CIDR form such as 10.20.0.0/16. You get the network and broadcast addresses, the usable host range, the subnet and wildcard masks and the address type. Below, split the network into equal subnets, size subnets of different sizes (VLSM) or convert a first-to-last range into CIDR blocks.

For example 192.168.1.10, or type it with a prefix: 10.0.0.0/8 or 10.0.0.1 255.255.0.0.

Network address
192.168.1.0/24
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
Broadcast address
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Old class (before CIDR)
Class C
Reverse DNS zone
1.168.192.in-addr.arpa

Address type: Private-Use (192.168.0.0/16, RFC 1918). Not reachable on the public internet.

In binary

Address  11000000.10101000.00000001.00001010
Mask     11111111.11111111.11111111.00000000

Split into smaller subnets

Split by

4 subnets of /26 (255.255.255.192), 62 usable hosts each.

#NetworkFirst hostLast hostBroadcast
1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.63
2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.127
3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.191
4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.255

Different sizes (VLSM)

List the subnets you need inside 192.168.1.0/24 and how many hosts each must hold. The largest are placed first so nothing overlaps and space is not wasted.

NameHosts neededSubnetUsable rangeUsable hostsBroadcast
Wi-Fi guests100192.168.1.0/25192.168.1.1 – 192.168.1.126126192.168.1.127
Office50192.168.1.128/26192.168.1.129 – 192.168.1.19062192.168.1.191
Router link2192.168.1.192/30192.168.1.193 – 192.168.1.1942192.168.1.195

196 of 256 addresses allocated (76.6%).

IP range to CIDR

Turn a first-to-last address range (for a firewall rule or allow list) into the fewest CIDR blocks.

5 blocks:

10.0.0.5/32
10.0.0.6/31
10.0.0.8/29
10.0.0.16/30
10.0.0.20/32

Pure calculation: this page never pings, looks up or contacts any address you type. Nothing is sent anywhere.

Sources

Address types come from the IANA registries below, stored in the page (no lookup). Classes A to E are shown only because exams still ask; routing has used CIDR prefixes since 1993.

About the IPv4 Subnet Calculator

Subnetting splits an IPv4 address into two parts: the network, shared by every device on the same segment, and the host, unique to each device. The prefix length (the number after the slash) says how many of the 32 bits belong to the network. This page does that bit arithmetic for you and adds the planning jobs that usually follow: equal splits, mixed-size subnets and range conversion.

Worked example

A colleague hands you 172.16.45.200/20. Type it in and the calculator answers:

  • Subnet mask 255.255.240.0, wildcard 0.0.15.255.
  • Network 172.16.32.0/20, broadcast 172.16.47.255.
  • Hosts 172.16.32.1 to 172.16.47.254, which is 4,094 usable addresses.
  • Address type: Private-Use (RFC 1918), so it is not reachable on the public internet.

The third octet explains the answer: a /20 moves in steps of 16 there, and 45 falls inside the block that starts at 32.

Planning more than one subnet

The split section answers questions such as “I need six VLANs out of this /24”. Six rounds up to eight, so each becomes a /27 with 30 usable hosts, and the table lists every network, host range and broadcast.

When the subnets need different sizes, use the VLSM list. Enter each segment with its host count; the page sorts them largest first and places each on a boundary that suits its size, so blocks never overlap and gaps stay small. If they cannot fit, it names the one that overflows.

The range converter goes the other way. Firewalls and cloud allow lists often want CIDR blocks, while a vendor may publish “10.0.0.5 to 10.0.0.20”. That range needs five blocks, from a /32 to a /29.

Limits worth knowing

Classes A to E appear only because training courses still mention them; routers ignore them. The address-type label comes from IANA registries saved in the page on the date shown in the sources, so a block reserved later will not be named until the list is updated. Nothing you type is pinged or looked up.

How to use IPv4 Subnet Calculator

  1. Enter an IP address and choose the subnet mask, or type the address with /prefix or a dotted mask.
  2. Read the network, host range, broadcast and masks. Copy the summary if you need it elsewhere.
  3. Optionally split the network into equal subnets, list subnets of different sizes for VLSM, or convert an address range to CIDR.

Privacy: how it works

Calculations run in your browser. The addresses you enter are not sent anywhere or contacted.

Frequently asked questions

Why are there two fewer usable hosts than addresses?

In a normal subnet the first address names the network and the last is the broadcast address, so neither can be given to a device. A /24 has 256 addresses and 254 usable hosts. A /31 is the exception: on point-to-point links both addresses are usable (RFC 3021).

What is a wildcard mask?

The subnet mask with every bit flipped, so 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF use it. If you type a wildcard mask where a subnet mask belongs, the calculator spots it and tells you the matching subnet mask.

Does it check whether an address is in use?

No. It is arithmetic only and never contacts the address. Private, shared, documentation and other special ranges are recognised from the IANA registries copied into the page.