Skip to content
SubnettingCalculator
IPv4 Detecting…
IPv6 Detecting…

FLSM Calculator – Fixed Length Subnet Mask Calculator

Use this free FLSM calculator to divide an IPv4 network into equal-sized subnets. Enter the number of subnets or the hosts you need in each one, and get the network address, usable IP range, broadcast address and subnet mask of every subnet, plus the free space left. Handy for office and lab network design and for subnetting exams.

FLSM Subnet Calculator

Enter a network, then fill in either the number of subnets or the hosts per subnet. Leave one box empty and it is calculated for you when you click Calculate. Or fill in both.

/24

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

1Enter the network

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.

2Fill in one number

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.

3Click Calculate

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.

4Read the result

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.

5Copy, download or start again

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 /31 or /32 can'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.

Borrowed bits = smallest b where 2^b >= subnets needed New prefix = old prefix + borrowed bits Subnets available = 2^b Addresses / subnet = 2^(32 - new prefix) Usable hosts = Addresses / subnet - 2 Block size = Addresses / subnet (step between network addresses)

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

  1. 3 subnets needs 2 borrowed bits, because 22 = 4 is the first power of 2 that is at least 3.
  2. The new prefix is /24 + 2 = /26, which is the mask 255.255.255.192.
  3. Each subnet has 26 = 64 addresses, so 62 usable hosts.
  4. Network addresses go up in steps of 64: .0, .64, .128, and a spare .192.

Fixed Length Subnetting (62 hosts each)

Subnet NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressTotal Usable HostsTotal Available HostsSubnet Mask
Subnet 1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.636264255.255.255.192
Subnet 2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.1276264255.255.255.192
Subnet 3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.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 NameNetwork AddressFirst Usable IPLast Usable IPBroadcast AddressTotal Usable HostsTotal Available HostsSubnet Mask
Subnet 4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.2556264255.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 prefixSubnetsAddresses eachUsable hosts eachSubnet mask
/252128126255.255.255.128
/2646462255.255.255.192
/2783230255.255.255.224
/28161614255.255.255.240
/293286255.255.255.248
/306442255.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.

Frequently asked questions

What does FLSM mean?

FLSM stands for Fixed Length Subnet Mask. It means a network is cut into subnets that are all the same size, so every subnet uses the same mask.

How do I work out how many subnets I get?

Count the bits you borrow from the host part. Each borrowed bit doubles the number of subnets. Borrow 2 bits and you get 4 subnets, borrow 3 and you get 8. A /24 split into /26 subnets borrows 2 bits, so it gives 4 subnets.

How do I find the hosts per subnet for a number of subnets?

Round the number of subnets up to the next power of 2 to get the borrowed bits, add them to the original prefix, then work out 2 to the power of the host bits, minus 2. For 3 subnets on a /24: 3 rounds up to 4, so 2 bits are borrowed, the new prefix is /26, and each subnet has 64 - 2 = 62 usable hosts.

Why did I get more subnets, or more hosts, than I asked for?

Subnet sizes come in powers of 2, so the calculator rounds up. Ask for 5 subnets and the network is cut into 8 blocks. The 3 blocks you didn't ask for show up under Free/Unused IP Network. In the same way, 50 hosts per subnet rounds up to a /26, which holds 62.

What is the smallest subnet this calculator can make?

A /32, which is a single IP address. A /31 can be split into two /32 subnets, and a /32 network itself cannot be split any further. When you give hosts per subnet, the smallest subnet is a /30 (2 usable hosts). Ask for more subnets instead to reach /31 and /32.

Can 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.

Are the first and last subnets safe to use?

Modern routers and firewalls accept them. Very old classful equipment may not, and in that case you can simply skip the first or the last subnet.

Can I keep the unused subnets for later?

Yes, and it is a good habit. The free blocks sit right after the used ones and do not overlap with them, so you can hand them out as the network grows.

Is anything I type sent to your server?

No. The calculation runs in your browser, so the networks you enter stay on your device.