What is FLSM?
FLSM stands for Fixed Length Subnet Mask. It's the simplest way to divide a network: you cut one block of addresses into pieces that are all the same size, so every subnet uses the same mask. Cut a /24 into four and you get four /26 subnets with 64 addresses each.
The price of that simplicity is some waste. If one department needs 50 hosts and another needs 5, both still get a block big enough for 50. FLSM works best when the groups are about the same size, like a row of identical office floors or lab rooms.
How to use this FLSM calculator
Type any address from the network into IP Address, then set the Subnet Mask or drag the CIDR slider. You don't need the exact network address. If you type 172.16.9.77 with /16, the calculator starts from 172.16.0.0/16 and tells you so. The slider goes from /0 to /32. A /32 is a single address and can't be split, so the calculator shows a warning there. A /31 can still be split into two /32 subnets.
Fill in No. of Subnets, Hosts per Subnet, or both. Nothing changes while you type. If you leave one box empty, it is worked out when you click Calculate and turns light teal so you can tell you didn't type it. On a /24, 50 hosts gives 4 subnets. If you enter both, say 40 hosts and 2 subnets, the subnet size comes from the hosts (a /26), you get the 2 subnets you asked for, and the 2 left over show under Free/Unused IP Network.
The result appears below the form (pressing Enter works too). From then on it follows your changes, so you can edit a number and watch the table update. If a box has a problem, a red message under it says what to fix.
The Fixed Length Subnetting table lists the subnets you asked for. If the split leaves blocks over, they appear in the Free/Unused IP Network table under it, ready for later. Tick or untick boxes in Show Columns to choose what you see: subnet name, first and last IP, broadcast, usable and total hosts, subnet mask, wildcard mask and IP type. On a phone or tablet that row slides sideways. The Network Address column is always shown.
Copy puts the table on your clipboard and Download saves it as a CSV file. Both include every subnet, not only the rows on screen, and only the columns you ticked. Clear All puts everything back to the starting values and hides the result.
Common slip-ups
- I asked for 5 subnets and got 8 blocks. Sizes come in powers of 2, so 5 rounds up to 8. The 3 extra blocks are listed as unused.
- Hosts per subnet is higher than I typed. Same reason. 50 hosts rounds up to a
/26, which holds 62. - "Too small to split". A
/31or/32can't be divided into subnets that hold hosts. - "This calculator lists up to 65,536 subnets". Pick a bigger number of hosts per subnet, or a smaller network.
How FLSM subnetting works
Every IPv4 address has network bits and host bits. To get more subnets you borrow bits from the host side. Each borrowed bit doubles the number of subnets and halves the hosts in each one.
Starting from hosts instead: find the smallest h where 2h is at least hosts + 2, and the new prefix is 32 - h.
Example 1: 192.168.1.0/24 into 3 subnets
- 3 subnets needs 2 borrowed bits, because 22 = 4 is the first power of 2 that is at least 3.
- The new prefix is
/24+ 2 =/26, which is the mask255.255.255.192. - Each subnet has 26 = 64 addresses, so 62 usable hosts.
- Network addresses go up in steps of 64:
.0,.64,.128, and a spare.192.
Fixed Length Subnetting (62 hosts each)
| Subnet Name | Network Address | First Usable IP | Last Usable IP | Broadcast Address | Total Usable Hosts | Total Available Hosts | Subnet Mask |
|---|---|---|---|---|---|---|---|
| Subnet 1 | 192.168.1.0/26 | 192.168.1.1 | 192.168.1.62 | 192.168.1.63 | 62 | 64 | 255.255.255.192 |
| Subnet 2 | 192.168.1.64/26 | 192.168.1.65 | 192.168.1.126 | 192.168.1.127 | 62 | 64 | 255.255.255.192 |
| Subnet 3 | 192.168.1.128/26 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 | 62 | 64 | 255.255.255.192 |
1 subnet of /26 (62 usable hosts each) is still free, starting at 192.168.1.192/26.
Free/Unused IP Network
| Subnet Name | Network Address | First Usable IP | Last Usable IP | Broadcast Address | Total Usable Hosts | Total Available Hosts | Subnet Mask |
|---|---|---|---|---|---|---|---|
| Subnet 4 | 192.168.1.192/26 | 192.168.1.193 | 192.168.1.254 | 192.168.1.255 | 62 | 64 | 255.255.255.192 |
Example 2: 50 hosts per subnet
50 hosts plus the network and broadcast addresses is 52 addresses. The first power of 2 that covers 52 is 64 = 26, so 6 host bits are needed and the prefix is 32 - 6 = /26. Inside a /24 that makes 4 subnets of 62 usable hosts each. It's the same split as Example 1, reached from the other direction.
Splitting a /24 into equal subnets
A quick reference for the most common case. Pick the row that matches how many subnets or hosts you need.
| New prefix | Subnets | Addresses each | Usable hosts each | Subnet mask |
|---|---|---|---|---|
| /25 | 2 | 128 | 126 | 255.255.255.128 |
| /26 | 4 | 64 | 62 | 255.255.255.192 |
| /27 | 8 | 32 | 30 | 255.255.255.224 |
| /28 | 16 | 16 | 14 | 255.255.255.240 |
| /29 | 32 | 8 | 6 | 255.255.255.248 |
| /30 | 64 | 4 | 2 | 255.255.255.252 |
Where FLSM works well
Identical branch offices, classrooms or lab rooms, one subnet per floor in a building where floors are similar, and exam questions that say "divide this network into N equal subnets". FLSM is easy to plan, easy to read in a routing table, and every subnet looks the same.
For a closer look at one subnet, put its network address and mask into the IPv4 Subnet Calculator.