Skip to content
AllNetworkTools
IPv4 Detecting…
IPv6 Detecting…

Free Advanced Subnet Calculator – FLSM & VLSM Calculator

Plan IPv4 subnets in seconds. Enter a network, then split it into equal subnets (FLSM) or fit different host counts (VLSM). See every network address, usable range and broadcast address, and divide or join subnets until the plan fits. Free, and everything runs in your browser.

Subnet Calculator

/24
Tip
  • Subnet or CIDR calculation: enter the IP address and subnet mask, or move the CIDR slider. The result shows instantly.
  • Equal subnets: type No. of Subnets, or one number in Minimum Hosts Per Subnet, then click Calculate.
  • Different sizes (VLSM): type several host counts separated by commas, like 100, 50, 25, then click Calculate.

What is a Subnet Calculator?

A subnet calculator splits an IPv4 network into smaller subnets and shows the details of each one: network address, usable host range, broadcast address, subnet mask and number of hosts.

This advanced calculator also plans equal-size subnets (FLSM) and different-size subnets (VLSM), and lets you divide or join any subnet. You can plan networks, VLANs and IP ranges without doing binary maths by hand.

How to use this subnet calculator

This calculator does subnetting, CIDR calculation, subnet mask to wildcard mask conversion, IP class detection, FLSM and VLSM. Pick what you need below. All examples use the network 192.168.1.0 with the mask 255.255.255.0 (/24).

1. Subnet details, CIDR and wildcard mask

Use this to see how many hosts a CIDR gives, and what the first and last IP are.

  1. Type an IPv4 address in IP Address.
  2. Add the Subnet Mask, or move the CIDR slider. The slider, the CIDR number and the subnet mask are linked, so when you change one, the other two change too.
  3. You see the result at once. You do not need to click anything.
IP Address 192.168.1.0 Subnet Mask 255.255.255.0 (/24)

Subnet Details

192.168.1.0/24 is shown as 1 subnet. Use Divide to split a subnet in two, or Join to merge it with its neighbour into the bigger block.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 1192.168.1.0/24192.168.1.1192.168.1.254192.168.1.255254256255.255.255.00.0.0.255Private (Class C)

2. Equal-size subnets (FLSM)

Use this when you want to split one network into subnets that all have the same number of hosts. Fill in one of the two boxes and click Calculate. The other box fills in by itself. If some part of the network is not used, it is shown in a separate Free/Unused IP Network table.

2a. You know how many subnets you need

Type a number in No. of Subnets and click Calculate. The calculator works out Minimum Hosts Per Subnet for you. In this example, 3 subnets need 4 equal blocks. The 4th block is not used, so it is shown as free.

IP Address 192.168.1.0 Subnet Mask 255.255.255.0 No. of Subnets 3 Minimum Hosts Per Subnet 62 (filled in)

Subnet Details

192.168.1.0/24 is shown as 3 subnets. Use Divide to split a subnet in two, or Join to merge it with its neighbour into the bigger block.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.636264255.255.255.1920.0.0.63Private (Class C)
Subnet 2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.1276264255.255.255.1920.0.0.63Private (Class C)
Subnet 3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.255.255.1920.0.0.63Private (Class C)

Free/Unused IP Network

64 addresses are still free, in 1 block, starting at 192.168.1.192. Blocks are listed in address order.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.2556264255.255.255.1920.0.0.63Private (Class C)

2b. You know how many hosts each subnet needs

Type a number in Minimum Hosts Per Subnet and click Calculate. The calculator works out No. of Subnets for you. Subnet sizes are always a power of 2, so 50 hosts becomes a /26 block with 62 usable hosts.

IP Address 192.168.1.0 Subnet Mask 255.255.255.0 Minimum Hosts Per Subnet 50 No. of Subnets 4 (filled in)

Subnet Details

192.168.1.0/24 is shown as 4 subnets. Use Divide to split a subnet in two, or Join to merge it with its neighbour into the bigger block.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.636264255.255.255.1920.0.0.63Private (Class C)
Subnet 2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.1276264255.255.255.1920.0.0.63Private (Class C)
Subnet 3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.255.255.1920.0.0.63Private (Class C)
Subnet 4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.2556264255.255.255.1920.0.0.63Private (Class C)

All 4 blocks are used here, so there is no Free/Unused table.

3. Different-size subnets (VLSM)

Use this when each subnet needs a different number of hosts. Type the host numbers in Minimum Hosts Per Subnet, separated by commas, and click Calculate. You get one subnet for each number. No. of Subnets fills in by itself from your list. The biggest subnet is placed first, so nothing overlaps and the least space is wasted.

IP Address 192.168.1.0 Subnet Mask 255.255.255.0 Minimum Hosts Per Subnet 25,50,100 No. of Subnets 3 (filled in)

Subnet Details

192.168.1.0/24 is shown as 3 subnets. Use Divide to split a subnet in two, or Join to merge it with its neighbour into the bigger block.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 1192.168.1.0/25192.168.1.1192.168.1.126192.168.1.127126128255.255.255.1280.0.0.127Private (Class C)
Subnet 2192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.255.255.1920.0.0.63Private (Class C)
Subnet 3192.168.1.192/27192.168.1.193192.168.1.222192.168.1.2233032255.255.255.2240.0.0.31Private (Class C)

Free/Unused IP Network

32 addresses are still free, in 1 block, starting at 192.168.1.224. Blocks are listed in address order.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 4192.168.1.224/27192.168.1.225192.168.1.254192.168.1.2553032255.255.255.2240.0.0.31Private (Class C)

The numbers 100, 50 and 25 are placed biggest first: /25, /26 and /27. The space left over is shown as free.

4. Work with the result

  • Each row in Subnet Details is one subnet. Free space is shown in its own Free/Unused IP Network table, and its rows carry on the numbering (Subnet 4, Subnet 5 and so on).
  • Use Show Columns to hide the columns you do not need.
  • Use Divide and Join to change any subnet. See step 5 below.
  • Click Copy to copy the table. Click Download to save it as a CSV file for Excel or Google Sheets. Both include every row, with the free space under a Free/Unused IP Network line.

5. Divide and Join

Every row has a Divide and a Join button. Use them to change the result.

  • Divide splits a subnet into two equal halves. For example, /26 becomes two /27.
  • Join merges a subnet with its neighbour into one bigger subnet. For example, two /27 become one /26.

Example: in the 3-subnet result above, click Divide on Subnet 2. It splits into two /27 subnets and the names are numbered again. Click Join to put them back.

Subnet Details

192.168.1.0/24 is shown as 4 subnets. Use Divide to split a subnet in two, or Join to merge it with its neighbour into the bigger block.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.636264255.255.255.1920.0.0.63Private (Class C)
Subnet 2192.168.1.64/27192.168.1.65192.168.1.94192.168.1.953032255.255.255.2240.0.0.31Private (Class C)
Subnet 3192.168.1.96/27192.168.1.97192.168.1.126192.168.1.1273032255.255.255.2240.0.0.31Private (Class C)
Subnet 4192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.255.255.1920.0.0.63Private (Class C)

Free/Unused IP Network

64 addresses are still free, in 1 block, starting at 192.168.1.192. Blocks are listed in address order.

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressUsable HostsTotal HostsSubnet MaskWildcard MaskIP TypeDivideJoin
Subnet 5192.168.1.192/26192.168.1.193192.168.1.254192.168.1.2556264255.255.255.1920.0.0.63Private (Class C)

So with this one calculator you can do subnetting, subnet mask to wildcard mask conversion, IP class detection, FLSM and VLSM calculation.

Common mistakes

  • "These subnets need more addresses than the network has." Use a shorter mask (a smaller CIDR number) or ask for fewer hosts.
  • No result for FLSM or VLSM. Click Calculate after you fill in the split boxes.
  • The network in the result is different from what I typed. The calculator always starts from the network address. For example, 192.168.1.77/24 gives 192.168.1.0/24.

Why use this subnet calculator?

Subnetting is the skill of cutting one IP network into smaller, right-sized networks. The rules are simple, but the binary maths behind them is slow and easy to get wrong, and one wrong bit gives overlapping ranges, wasted addresses or devices that cannot talk to each other. This calculator does that part for you, instantly and correctly, so you can spend your time on the design.

Get exact answers in seconds

Enter an address and a mask and you immediately see the network address, first and last usable IP, broadcast address, usable and total hosts, subnet mask and wildcard mask. No converting to binary, no counting bits and no off-by-one mistakes with the network and broadcast addresses.

Plan FLSM and VLSM in one place

As well as showing the details of one network, the calculator can split it:

  • Equal subnets (FLSM): ask for a number of subnets or a number of hosts and get equal blocks.
  • Different sizes (VLSM): type host counts like 100, 50, 25, 10 and each department gets a block of the right size, largest first, so nothing overlaps.

See the free space and avoid waste

Whatever is not used appears in its own Free/Unused IP Network table. You can see at a glance how much room is left for growth, a new VLAN or another site, instead of discovering later that you ran out of addresses.

Adjust the plan with Divide and Join

Plans change. If a team grows or a link needs only two addresses, you can Divide a subnet into two halves or Join it back with its neighbour, and the table updates straight away. You do not have to start again from scratch.

Check your work and learn

Students preparing for CCNA, Network+ and similar exams can solve a problem by hand and then confirm the answer. Moving the CIDR slider and watching the mask, host count and broadcast address change is also a fast way to understand how prefix lengths work. The FAQ below explains each term in plain language.

Document and share the result

Copy the table into a document or ticket, or Download it as a CSV file for Excel or Google Sheets. It includes every row and every column, so it works as your addressing plan or as evidence for a change request.

Free, private and works anywhere

There is nothing to install and no sign-up. The calculation runs in your browser, so the networks you type are not sent to our server. The page works on desktop, tablet and phone, in light and dark mode.

Who uses it

  • Network and system administrators planning offices, VLANs, DMZs and router links.
  • Cloud and DevOps engineers sizing VPC, VNet and Kubernetes subnets so ranges never clash.
  • Helpdesk and support staff checking whether two devices are in the same subnet.
  • Students and teachers practising and verifying subnetting exercises.

Example: one /24 for four teams

You have 192.168.10.0/24 and four teams that need 100, 50, 25 and 10 hosts. Type those numbers in Minimum Hosts Per Subnet and click Calculate. You get:

  • 192.168.10.0/25 for 100 hosts (126 usable)
  • 192.168.10.128/26 for 50 hosts (62 usable)
  • 192.168.10.192/27 for 25 hosts (30 usable)
  • 192.168.10.224/28 for 10 hosts (14 usable)

That leaves 192.168.10.240/28 free for future use. Doing this by hand means working out four masks and four boundaries and checking that they do not overlap, which the calculator does in a moment.

Tip: add some growth room to every host count, commonly 20 to 50 percent, so a subnet does not fill up the first time you add a few devices.

IPv4 Subnet Cheat Sheet – CIDR, Masks, Hosts & Classes

Quick reference for every prefix length from /0 to /32, plus IP address classes and private/special ranges. Usable hosts = total addresses minus network and broadcast (except /31 which has 2 usable and /32 which has 1).

Subnet masks from /0 to /32

CIDRSubnet MaskWildcard MaskTotal AddressesUsable HostsNotes
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294Default route (0.0.0.0/0): matches every address
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454Multicast block 224.0.0.0/4, reserved block 240.0.0.0/4
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214Class A default mask; private 10.0.0.0/8; loopback is 127.0.0.0/8
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302Shared address space (carrier-grade NAT) 100.64.0.0/10
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574Private range 172.16.0.0/12
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534Class B default mask; link-local 169.254.0.0/16; many private networks also use /16
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254Class C default mask; the most common LAN size
/25255.255.255.1280.0.0.127128126Half of a /24
/26255.255.255.1920.0.0.636462Quarter of a /24
/27255.255.255.2240.0.0.313230Small office or VLAN
/28255.255.255.2400.0.0.151614Small VLAN, DMZ
/29255.255.255.2480.0.0.786Small server group
/30255.255.255.2520.0.0.342Point-to-point link between two routers
/31255.255.255.2540.0.0.122Point-to-point link, both addresses usable (RFC 3021)
/32255.255.255.2550.0.0.011Single host route; loopback or router ID

IP address classes

Classes come from the first bits of the address. Modern networks use CIDR instead, but classes are still used in exams and in the IP Type column of this calculator.

ClassAddress RangeFirst BitsDefault MaskNetworksHosts per NetworkUsed For
A1.0.0.0 – 126.255.255.2550/8 (255.0.0.0)12616,777,214Very large networks. 0.x.x.x and 127.x.x.x are special.
B128.0.0.0 – 191.255.255.25510/16 (255.255.0.0)16,38465,534Medium to large networks
C192.0.0.0 – 223.255.255.255110/24 (255.255.255.0)2,097,152254Small networks and LANs
D224.0.0.0 – 239.255.255.2551110Nonen/an/aMulticast
E240.0.0.0 – 255.255.255.2551111Nonen/an/aReserved for experiments

Private, public and special IP ranges

TypeCIDR BlockAddress RangeAddressesNotes
Private10.0.0.0/810.0.0.0 – 10.255.255.25516,777,216RFC 1918. Large private networks.
Private172.16.0.0/12172.16.0.0 – 172.31.255.2551,048,576RFC 1918. Only 172.16 to 172.31 is private.
Private192.168.0.0/16192.168.0.0 – 192.168.255.25565,536RFC 1918. Home and small office networks.
Loopback127.0.0.0/8127.0.0.0 – 127.255.255.25516,777,216The device itself. 127.0.0.1 is localhost.
Link-local (APIPA)169.254.0.0/16169.254.0.0 – 169.254.255.25565,536Self-assigned when DHCP is not available.
Shared address space (CGNAT)100.64.0.0/10100.64.0.0 – 100.127.255.2554,194,304Used by internet providers for carrier-grade NAT.
This network / default route0.0.0.0/80.0.0.0 – 0.255.255.25516,777,2160.0.0.0 means unspecified; 0.0.0.0/0 is the default route.
Multicast (Class D)224.0.0.0/4224.0.0.0 – 239.255.255.255268,435,456One-to-many delivery.
Reserved (Class E)240.0.0.0/4240.0.0.0 – 255.255.255.254268,435,455Reserved for future or experimental use.
Limited broadcast255.255.255.255/32255.255.255.2551Broadcast to the local network segment.
Documentation192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24192.0.2.0 – 192.0.2.255 and the two others256 eachRFC 5737. For examples and manuals only.
Benchmark testing198.18.0.0/15198.18.0.0 – 198.19.255.255131,072RFC 2544. For network device testing.
PublicEverything elseRoutable on the internetAssigned by internet registries and providers.
Remember: a block is a valid subnet only if its first address is a multiple of its size. For example a /26 (64 addresses) can start at .0, .64, .128 or .192, but never at .50.

Frequently asked questions

How to use this subnet calculator for subnetting, FLSM and VLSM, plus the networking basics behind it.

About this calculator

1What is this subnet calculator and what can it do?

This is a free IPv4 subnet calculator that works out the details of a network and then helps you plan how to split it. Enter an IP address with a subnet mask (or move the CIDR slider) and it shows the network address, first and last usable IP, broadcast address, usable and total hosts, subnet mask, wildcard mask and IP type.

From there you can:

  • Split the network into equal subnets (FLSM) by giving a number of subnets or a number of hosts.
  • Split it into subnets of different sizes (VLSM) by typing several host counts separated by commas.
  • Divide any subnet into two halves or Join it back with its neighbour.
  • Choose which columns to show, copy the table, or download it as a CSV file.

2Is the calculator free to use?

Yes. It is free, with no sign-up, no limit on how many times you use it and nothing to install. Open the page and calculate.

3Which browsers and devices does it support?

It runs in any modern browser with JavaScript turned on, on desktop, tablet and phone, and the layout adapts to the screen size. On a phone, the results tables scroll sideways when they are wider than the screen.

4Is the network I enter stored or sent anywhere?

The calculation runs in your browser, so the addresses you type are not sent to our server and are not stored.

One thing is separate: the “Your IP” bar at the top looks up your own public address using outside lookup services, so those services see your connection the way any website does. The language menu uses Google Translate, which also loads from Google.

5Can I use it for IPv6?

No. This calculator is for IPv4 only. IPv6 works differently (128-bit addresses, normally a /64 for each LAN, and no broadcast), and the questions below explain the main differences.

6Is there a limit on how many subnets I can create?

Yes. The calculator lists up to 4,096 subnets at a time, and accepts up to 1,000 host values in the Minimum Hosts Per Subnet box. Large results are shown 500 rows at a time with a “Show more” button, and Copy and Download always include every row. If a request would make too many subnets, the calculator tells you and asks for a smaller number.

Using the calculator

7How do I get the details of a single network?

  1. Type any address from the network in IP Address, for example 192.168.1.0.
  2. Set the Subnet Mask (for example 255.255.255.0) or drag the CIDR slider.
  3. Leave No. of Subnets and Minimum Hosts Per Subnet empty.

The Subnet Details table shows straight away with the network as one subnet: network address, first and last usable IP, broadcast address, usable and total hosts and masks. No button is needed.

8How are the IP address, subnet mask and CIDR boxes linked?

They stay in sync. Change the mask and the CIDR slider moves. Move the slider and the mask changes. You can also paste an address with its prefix, like 10.0.0.0/16, into the IP Address box and both the mask and the slider are set for you. Only a valid mask is accepted (all 1s followed by all 0s), so something like 255.0.255.0 is reported as an error.

9Can I enter an address that is not the first one in the network?

Yes. If you type 172.16.9.77 with /16, the calculator starts from the network address 172.16.0.0/16 and tells you that it did. You can also paste an address with its prefix, like 10.0.0.0/16, into the IP Address box.

10What does each column in the results table mean?

  • Subnet Name: a label for the row: Subnet 1, Subnet 2 and so on, and, in the Free/Unused table, the next numbers (Subnet 4, Subnet 5 and so on) for left-over blocks.
  • Network Address: the subnet itself with its prefix, such as 192.168.1.64/26. This column is always shown.
  • First Usable IP and Last Usable IP: the first and last usable addresses you can give to devices.
  • Broadcast Address: the last address of the subnet. It shows N/A for /31 and /32, which have none.
  • Usable Hosts: addresses you can assign (total minus network and broadcast).
  • Total Hosts: every address in the block, including the network and broadcast addresses.
  • Subnet Mask: the mask of that subnet, for example 255.255.255.192 for a /26.
  • Wildcard Mask: the inverse of the mask, used in access lists and routing protocols (hidden until you tick it).
  • IP Type: whether the block is Private, Public and so on, with its class (hidden until you tick it).
  • Divide / Join: buttons to split a subnet or merge it back.

11How do I show or hide columns?

Use the Show Columns tick boxes above the table. Tick Wildcard Mask or IP Type to add them, or untick any column you do not need, for example Divide / Join to hide the buttons. The Copy and Download buttons always include every column, so hiding a column on screen does not remove it from the export.

12What does the IP Type column show?

It tells you what kind of address block each subnet is, with the class in brackets. The values are Public, Private (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), Loopback (127.x.x.x), Link-local (169.254.x.x), Shared / CGNAT (100.64.0.0/10), Multicast, Reserved and This network (0.x.x.x). For example 192.168.1.0 shows Private (Class C).

It is based on the first address of the subnet, so it helps you check at a glance whether a plan uses private ranges.

13How do I copy or download the results?

Click Copy above the table to put it on your clipboard, then paste it into a document or a spreadsheet. Click Download to save a CSV file that opens in Excel or Google Sheets. Both include every row (not only the 500 shown on screen) and every column, without the Divide/Join buttons.

14How are the results displayed? Is there a visual view?

Results are shown as clear tables: Subnet Details for the subnets you asked for and Free/Unused IP Network for the space that is left. Each row is one subnet, and you can change its size directly with Divide and Join, so the plan updates as you work. There is no separate diagram view at the moment.

Subnetting with FLSM, VLSM, Divide and Join

15What is FLSM and how do I do it here?

FLSM splits a network into subnets that all use the same mask and have the same size. It is simple and predictable, and it is easy to plan and document. The drawback is waste when departments need very different sizes. If you split a /24 into four /26 subnets (62 hosts each) and one team only needs 10 hosts, 52 addresses are wasted.

The number of equal subnets is always a power of 2, so when you ask for 3 subnets the calculator makes 4 and shows the fourth in Free/Unused IP Network.

16What is VLSM and how do I do it here?

VLSM uses different masks inside the same network so each subnet is sized for its real need. It needs a routing protocol that sends masks with routes (RIPv2, OSPF, EIGRP, BGP).

Method: sort the requirements from largest to smallest, round each up to a power of 2, then place them one after another from the start of the block. Largest first keeps every subnet correctly aligned. Example for 192.168.10.0/24 with needs of 100, 50, 25 and 10 hosts:

  • 100 hosts: 192.168.10.0/25 (126 usable)
  • 50 hosts: 192.168.10.128/26 (62 usable)
  • 25 hosts: 192.168.10.192/27 (30 usable)
  • 10 hosts: 192.168.10.224/28 (14 usable)

That leaves 192.168.10.240/28 free for growth. Type 100, 50, 25, 10 in Minimum Hosts Per Subnet to see this result.

17Which box updates the other one?

Whichever you edit last. Edit No. of Subnets and Minimum Hosts Per Subnet shows the hosts each subnet gets. Edit the hosts and No. of Subnets shows how many subnets that makes. The box filled in for you is tinted. The table for FLSM or VLSM appears when you click Calculate.

18Why did I get more address space than I asked for?

Subnet sizes come in powers of 2, so the calculator rounds up. A subnet for 50 hosts becomes a /26 (62 usable hosts), and a subnet for 100 hosts becomes a /25 (126 usable hosts).

19What is the smallest subnet it makes from a hosts list?

A /30, which has 2 usable hosts. To go smaller, use Divide: a /30 can be split into two /31 subnets, and a /31 into two /32 single addresses.

20What is the Free/Unused IP Network box?

It lists the addresses in your network that are not part of a subnet you asked for, in their own table below the Subnet Details, numbered as the next subnets (Subnet 4, Subnet 5 and so on). For example the fourth /26 when you ask for 3 subnets on a /24. They do not overlap with the used subnets, so you can keep them for future growth or divide them for a new VLAN.

21What do Divide and Join do?

Divide splits one subnet into two equal halves, for example a /26 into two /27 subnets. Join merges a subnet with its neighbouring half back into the bigger block they came from, for example two /27 subnets into a /26. If the neighbour was divided into smaller pieces, they are all merged together. Both work on any row, including Unused ones.

22Why is Join greyed out on some rows?

Join is greyed out only on a row that already is the whole network you entered, because there is no bigger block above it. Every other row can be joined.

23How does the calculator avoid overlapping subnets?

For VLSM it places the largest subnet first, then the next largest, and so on, each starting on a correct boundary for its size. Subnets therefore never overlap and every one is a valid network. The leftover addresses are shown in the Free/Unused table, which also never overlaps the used blocks. Divide and Join also only split or merge a block with its own halves, so the plan stays consistent.

24Can I use it for network design?

Yes. A typical workflow: enter your parent block (for example 10.10.0.0/16 or 192.168.10.0/24), type the host counts for each department, VLAN or site, click Calculate, and read off the ranges. Add some growth room to every number, then use Divide and Join to fine-tune. When you are happy, download the CSV and keep it as your addressing plan. For a larger design, give each site its own block so the sites can be summarized into one route later.

Subnetting concepts

25What is a subnet?

A subnet (short for subnetwork) is a smaller logical network cut out of a larger IP network. Devices in the same subnet share the same network portion of their addresses and can talk to each other directly, without a router. To reach a device in another subnet, traffic goes to the default gateway (a router).

For example, 192.168.1.0/24 can be cut into four subnets, 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26, one for each department.

26What is subnetting and why is it used?

Subnetting is the process of dividing one network into smaller subnets by borrowing bits from the host portion of the address and using them for the network portion. People do it to:

  • Reduce broadcast traffic, because every subnet is its own broadcast domain.
  • Improve security, because you can filter traffic between subnets with firewalls and access lists.
  • Organize the network by department, floor, site, VLAN or function.
  • Use addresses efficiently, giving each segment about the space it needs.
  • Simplify routing and troubleshooting, because related addresses are grouped together.

27What is a network address?

The network address is the first address of a subnet, the one where all host bits are 0. It names the subnet itself, appears in routing tables, and cannot be given to a device.

You find it by doing a bitwise AND of the IP address and the subnet mask. For 192.168.1.130 with mask 255.255.255.192, the last octet is 130 AND 192 = 10000010 AND 11000000 = 10000000 = 128. The network address is 192.168.1.128, written 192.168.1.128/26.

28What is a broadcast address?

The broadcast address is the last address of a subnet, where all host bits are 1. A packet sent to it is delivered to every device in that subnet. It cannot be given to a device.

For 192.168.1.128/26 the broadcast address is 192.168.1.191 (network 128 + block size 64 − 1). The address 255.255.255.255 is the limited broadcast, which stays on the local segment. Routers do not forward broadcasts, so each subnet is its own broadcast domain. IPv6 has no broadcast, and /31 and /32 subnets have none either (this calculator shows N/A).

29What are the first and last usable IP addresses?

The first usable IP is the network address plus 1. The last usable IP is the broadcast address minus 1. Everything in between can be given to devices.

Example 192.168.1.128/26: network .128, first usable .129, last usable .190, broadcast .191, which makes 62 usable hosts.

30What is a subnet mask?

A subnet mask is a 32-bit number written like an IP address. It is a run of 1s followed by a run of 0s: the 1s mark the network bits and the 0s mark the host bits. A device ANDs the mask with an address to find the network it belongs to. 255.255.255.0 is 24 ones followed by 8 zeros, which is /24.

Only masks with all 1s first are valid, so 255.255.0.255 is not a mask. The common ones:

  • /24 = 255.255.255.0, 254 usable hosts
  • /25 = 255.255.255.128, 126 usable hosts
  • /26 = 255.255.255.192, 62 usable hosts
  • /27 = 255.255.255.224, 30 usable hosts
  • /28 = 255.255.255.240, 14 usable hosts
  • /29 = 255.255.255.248, 6 usable hosts
  • /30 = 255.255.255.252, 2 usable hosts

31What is CIDR notation?

CIDR (Classless Inter-Domain Routing) lets the network prefix be any length from 0 to 32. It is written as a slash and a number after the address, such as 192.168.1.0/24. The number is the count of 1 bits in the subnet mask.

CIDR replaced the fixed A, B and C classes in the 1990s. It made VLSM and route summarization possible and slowed the exhaustion of IPv4 addresses, because organizations could get a block that matched their size instead of a whole class.

32What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask. A 0 bit means the bit must match, and a 1 bit means it can be anything. Subtract the subnet mask from 255.255.255.255 to get it:

  • /24, 255.255.255.0 gives 0.0.0.255
  • /26, 255.255.255.192 gives 0.0.0.63
  • /30, 255.255.255.252 gives 0.0.0.3

Wildcard masks are used in access lists and in routing protocol network statements, for example permit 192.168.1.0 0.0.0.255 matches every address from 192.168.1.0 to 192.168.1.255. A wildcard of 0.0.0.0 matches one exact host. Unlike a subnet mask, an access-list wildcard may have its 1s and 0s mixed. Turn on Wildcard Mask in Show Columns to see it for every subnet.

33How do I calculate the number of usable hosts?

With h host bits a subnet has 2h addresses in total, and 2h − 2 usable hosts, because the network address and the broadcast address cannot be used by devices.

  • /24: 8 host bits, 256 total, 254 usable
  • /26: 6 host bits, 64 total, 62 usable
  • /30: 2 host bits, 4 total, 2 usable

Two special cases: a /31 has 2 usable addresses (for point-to-point links, RFC 3021) and a /32 has 1. Every subnet loses 2 addresses, so splitting into many very small subnets wastes more space.

34How many subnets and hosts will I get?

If you move from an original prefix to a longer new prefix, you borrow b bits where b = new prefix − original prefix. Then subnets = 2b and usable hosts per subnet = 2(32 − new prefix) − 2. Example: 192.168.1.0/24 split into /27 gives b = 3, so 8 subnets with 30 hosts each.

To work backwards from a host count, find the smallest number of host bits h where 2h is at least hosts + 2. For 50 hosts, h = 6 (64 ≥ 52), so the prefix is /26. Modern equipment can use the first and last subnet, so no subnet needs to be skipped.

35How do I subnet by hand using the block size method?

  1. Find the octet of the mask that is not 255 or 0 (the interesting octet).
  2. Block size = 256 minus that value.
  3. Subnets start at 0 and go up in steps of the block size.
  4. The broadcast address is the next subnet's address minus 1. The usable range is everything between.

Example 192.168.1.0/27: mask 255.255.255.224, block size 256 − 224 = 32. The subnets start at .0, .32, .64, .96, .128, .160, .192 and .224. For the subnet .64: first usable .65, last usable .94, broadcast .95.

36How do I know if two IP addresses are in the same subnet?

AND each address with the subnet mask and compare the two network addresses. If they match, the devices are in the same subnet.

Example with mask 255.255.255.192 (/26): 192.168.1.100 is in the network 192.168.1.64 (range 64 to 127), and 192.168.1.130 is in the network 192.168.1.128 (range 128 to 191). They are in different subnets and need a router, even though the first three octets look alike.

37What is a default gateway and where does it sit in the subnet?

The default gateway is the address of the router interface that devices send traffic to when the destination is outside their own subnet. It must be a usable address inside the same subnet. By convention it is the first usable address (such as 192.168.1.1) or the last usable one (192.168.1.254).

A device decides whether a destination is local or remote by ANDing the destination with its own subnet mask. If the result is a different network, it sends the packet to the gateway.

IP address basics

38What is an IP address?

An IP (Internet Protocol) address is a numeric label given to every device on a network that uses the Internet Protocol. It does two jobs: it identifies the device and it tells routers where the device is, so data can be delivered to it. An example is 192.168.1.10.

Every IP address has two parts, a network portion (which network the device belongs to) and a host portion (which device inside that network). The subnet mask or prefix length shows where one part ends and the other begins. There are two versions in use today, IPv4 and IPv6.

39What is IPv4 and how is an IPv4 address written?

IPv4 is version 4 of the Internet Protocol. An IPv4 address is 32 bits long. It is written in dotted decimal form: four numbers called octets, separated by dots, each from 0 to 255 because each octet is 8 bits. For example 203.0.113.25.

32 bits give 232 = 4,294,967,296 possible addresses, and a large share of them is reserved for private, multicast and special use. The central pool of unallocated IPv4 blocks ran out in 2011, which is why NAT, private addressing and IPv6 are so common.

40How do I convert an IP address to binary?

Each octet is 8 bits with place values 128 64 32 16 8 4 2 1. Put a 1 under the values that add up to the number and a 0 under the rest.

  • 192 = 128 + 64, so 11000000
  • 168 = 128 + 32 + 8, so 10101000
  • 1 = 1, so 00000001
  • 10 = 8 + 2, so 00001010

So 192.168.1.10 is 11000000.10101000.00000001.00001010. Binary matters because subnet masks work bit by bit.

41What is the difference between a public and a private IP address?

A public IP address is unique across the whole internet and is assigned by your internet provider or a regional registry. A private IP address comes from ranges reserved by RFC 1918. These are not routed on the internet, so any number of organizations can reuse them inside their own networks:

  • 10.0.0.0/8: 10.0.0.0 to 10.255.255.255 (16,777,216 addresses)
  • 172.16.0.0/12: 172.16.0.0 to 172.31.255.255 (1,048,576 addresses)
  • 192.168.0.0/16: 192.168.0.0 to 192.168.255.255 (65,536 addresses)

Devices with private addresses reach the internet through NAT. A common mistake is to treat all of 172.x.x.x as private. Only 172.16 to 172.31 is private, and 172.32.0.0 and above is public. The IP Type column in this calculator tells you which one an address is.

42What are IP address classes (A, B, C, D and E)?

Classful addressing was the original way to split IPv4 space, based on the first octet:

  • Class A: 1 to 126, default mask /8 (255.0.0.0), 16,777,214 hosts per network
  • Class B: 128 to 191, default mask /16 (255.255.0.0), 65,534 hosts per network
  • Class C: 192 to 223, default mask /24 (255.255.255.0), 254 hosts per network
  • Class D: 224 to 239, used for multicast
  • Class E: 240 to 255, reserved for experimental use

The first octets 0 and 127 are special (0 means this network, 127 is loopback). Classes were replaced by CIDR in the 1990s, so today you can use any prefix length on any address. The calculator's IP Type column shows the class next to the type, for example Private (Class C) or Public (Class A).

43What are the special and reserved IPv4 addresses?

  • 0.0.0.0: unspecified address, also the default route as 0.0.0.0/0
  • 127.0.0.0/8: loopback, where 127.0.0.1 means this same device (localhost)
  • 169.254.0.0/16: link-local, self-assigned (APIPA) when a device cannot get an address from DHCP
  • 100.64.0.0/10: shared address space used by internet providers for carrier-grade NAT
  • 224.0.0.0/4: multicast
  • 240.0.0.0/4: reserved
  • 255.255.255.255: limited broadcast on the local network
  • 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24: reserved for documentation and examples

44What is NAT?

Network Address Translation lets many devices with private addresses share one public address. The router rewrites the source address (and usually the port, which is called PAT or NAT overload) on outgoing packets, remembers the mapping, and translates the replies back to the right device.

NAT exists because of the IPv4 shortage and also hides your internal addressing. It is not a firewall by itself. Because everyone reuses the same private ranges, two networks that use the same range cannot be joined over a VPN without renumbering, so plan unique ranges early.

45What is IPv6 and how is subnetting different?

IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits, for example 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Leading zeros can be dropped and one run of all-zero groups can be replaced by ::, giving 2001:db8:85a3::8a2e:370:7334. There are about 3.4 × 1038 addresses.

In IPv6 a normal LAN subnet is a /64 (64 network bits, 64 host bits). Providers usually give a /56 or /48, which gives you 256 or 65,536 subnets of /64. IPv6 has no broadcast address and no need to count hosts or conserve addresses. This calculator is for IPv4 only.

Advanced topics

46What is supernetting (route summarization)?

Supernetting combines several contiguous networks into one larger block with a shorter prefix. In routing it is called route summarization or aggregation, and it shrinks routing tables. It works only when the networks are contiguous, their number is a power of 2, and the first network sits on the boundary of the bigger block.

Example: 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24 summarize to 192.168.0.0/22 (mask 255.255.252.0). By contrast 192.168.1.0/24 and 192.168.2.0/24 cannot become one /23, because a /23 would be .0 and .1, or .2 and .3. The Join button in this calculator does a similar thing: it merges a subnet with its neighbouring half into the bigger block they came from.

47What are /31 and /32 subnets used for?

A /31 has 2 addresses and both are usable. It is meant for point-to-point links between two routers (RFC 3021) and saves half the space of a /30, which uses 4 addresses for 2 devices. A /32 is a single address, used as a host route, for loopback interfaces, router IDs and rules that target exactly one host. Some older equipment does not support /31, so check before using it.

48What is longest prefix match?

When a router has several routes that match a destination, it uses the one with the longest prefix, which is the most specific. Take these routes: 10.0.0.0/8 via A, 10.1.0.0/16 via B, 10.1.1.0/24 via C and 0.0.0.0/0 via D.

  • 10.1.1.50 goes via C (the /24 is the longest match)
  • 10.1.2.5 goes via B
  • 10.9.9.9 goes via A
  • 8.8.8.8 goes via D (only the default route matches)

49What is a broadcast domain and how do VLANs relate to subnets?

A broadcast domain is the group of devices that receive each other's broadcasts. Routers do not forward broadcasts, so each subnet is a separate broadcast domain. A VLAN splits one physical switch into several broadcast domains. The usual design is one VLAN for one subnet, for example VLAN 10 uses 192.168.10.0/24. Traffic between VLANs must pass through a router or a layer 3 switch.

Smaller subnets mean less broadcast noise from protocols like ARP and DHCP discovery, which keeps larger networks responsive.

50How do I plan an IP addressing scheme?

  1. List every segment (VLANs, sites, router links) and count its devices.
  2. Add room for growth, commonly 20 to 50 percent, plus gateway and infrastructure addresses.
  3. Round each need up to a power of 2 and pick the mask.
  4. Sort from largest to smallest and allocate in order (VLSM) so blocks stay aligned.
  5. Give each router-to-router link a /30 (or /31).
  6. Reserve spare blocks between sites so each site can grow and still be summarized as one route.
  7. Choose private ranges that will not clash with partner VPNs, cloud networks or home networks. Many people use 192.168.0.0/24 at home, so a less common 10.x.x.x block is safer.
  8. Write the plan in a spreadsheet or IPAM tool. Use this calculator's Download button to start it.

51What are the most common subnetting mistakes?

  • Counting the network and broadcast addresses as usable hosts.
  • Choosing a subnet for exactly the current hosts, with no room to grow.
  • Starting a subnet at an address that is not a multiple of its size, which misaligns it and makes it overlap its neighbour.
  • Overlapping subnets, which break routing.
  • Mixing up the subnet mask and the wildcard mask in access lists.
  • Comparing only the first three octets when the mask is not /24.
  • Treating all of 172.x.x.x as private (only 172.16 to 172.31 is).
  • Forgetting that the gateway and other infrastructure also need addresses.

Quick answers people search for

52How many usable hosts are in a /24, /25, /26, /27, /28, /29 and /30?

  • /24 → 254 usable hosts (most common LAN size)
  • /25 → 126 usable hosts
  • /26 → 62 usable hosts
  • /27 → 30 usable hosts
  • /28 → 14 usable hosts
  • /29 → 6 usable hosts
  • /30 → 2 usable hosts (classic point-to-point)

A /31 also has 2 usable addresses (RFC 3021) and a /32 has 1.

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

A subnet mask marks network bits with 1s and host bits with 0s (example: 255.255.255.0). A wildcard mask is the opposite: 0 means “must match” and 1 means “any value” (example: 0.0.0.255). Wildcard masks are used in access-lists and some routing protocol statements. You can show the wildcard for every subnet by ticking the Wildcard Mask column in this calculator.

54How do I find the network address of an IP?

Do a bitwise AND of the IP address and the subnet mask. For example 192.168.1.130 with mask 255.255.255.192 (/26) gives network address 192.168.1.128. This calculator does it for you the moment you enter the IP and mask (or CIDR).

55Can two devices with the same first three octets be in different subnets?

Yes. When the mask is longer than /24 the last octet is split. For example with /26, 192.168.1.50 is in the 192.168.1.0–63 block and 192.168.1.100 is in the 192.168.1.64–127 block. They need a router to talk to each other even though the first three numbers look the same.

56What is the best private IP range for a new network?

Prefer 10.0.0.0/8 or a slice of it if you need room to grow. Many home routers use 192.168.0.0/24 or 192.168.1.0/24, so choosing a less common 10.x block reduces the chance of clashing with VPNs, partner networks or home labs. Avoid using the whole 172.16.0.0/12 unless you really need that size.

57How do I check if two IP addresses are in the same subnet?

AND both addresses with the same subnet mask. If the resulting network addresses are identical, the two IPs are in the same subnet. You can also enter either address in this calculator and look at the First/Last Usable range.