Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is a subnet calculator and what is it used for?

share|improve this question

migrated from Nov 3 '09 at 16:44

This question came from our site for professional and enthusiast programmers.

3 – z - Nov 3 '09 at 16:42

A subnet calculator is just a simple tool to determine the attributes of a particular ip subnet including but not limited to the beginning and end ips in that particular range. If you need a primer on ip subnetting check out,


if you just want to calculate some subnets check out the excellent whatmask for linux or a web based calculator

share|improve this answer
This one is my favorite: – Seth Nov 3 '09 at 17:46
Not so difficult to just answer the OP's question now, is it? – NginUS Nov 13 '10 at 22:46

Is Google broken?

share|improve this answer
+1 i'm voting only because there is far too much stuff being asked that needs to be searched on first. as a matter of fact, the thread linked by sparks is the 5th link in google. – DanBig Nov 3 '09 at 17:29

Subnets are easy if you're using netmasks that are on 8-bit boundaries. /22 or /21 for example are a little harder to calculate in your head unless you do it all day long. A subnet calculator will show you the available ranges of IPs for a given netmask.

share|improve this answer

Subnetting is all about choosing the right network sizes for the tasks and is the core concept of all LAN/WAN routing and switching.

There is a good explanation by Evan Anderson on Server Fault at

share|improve this answer

Note that the rules used by a subnet calculator for IPv4 addresses, are no longer valid for IPv6 addresses where we no longer try to pack as much stuff into the address space as we can. So in IPv6, all subnets are /64 unless they are aggregating other subnets, in which case they work similar to IPv4, except that you have a /48 per site giving you 8 bits of working space. That would be like getting an IPv4 /16 and using a /24 for every subnet that is a broadcast domain. Very bad practice in IPv4, but best practice in IPv6.

To understand IPv4 subnetting, work through an example where you are building a data center with 120 hosts. You should get a /25 as the right sized subnet. But what if you will add another 60 hosts after the first months for a total of 180 hosts. Does your subnet calculator suggest 3 /26 blocks or one /24. Draw it out graphically on graph paper where you can make an 8 x 8 square for the 64 IP addresses in a /26 block.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.