NetCalc Lab

IPv4/IPv6 subnetting, VLSM and route summarisation. Everything runs locally in your browser.

Subnet guide: 256 · 128 · 64 · 32 · 16 · 8 · 4 · 2 · 1
Hosts (addresses)2561286432168421
Subnet/24/25/26/27/28/29/30/31/32
Mask (last octet)0128192224240248252254255
Usable hosts254126623014622*1*

Each step right halves the block. Usable hosts = addresses minus 2 (network and broadcast). *A /31 is for point-to-point links (both addresses usable); a /32 is a single host.

Special address ranges (private, loopback, link-local, IPv6…)
RangeNameFrom – toWhat it is
10.0.0.0/8Private10.0.0.0 – 10.255.255.255Home, office and lab networks. Not routed on the internet.
172.16.0.0/12Private172.16.0.0 – 172.31.255.255172.16.0.0 to 172.31.255.255. Not routed on the internet.
192.168.0.0/16Private192.168.0.0 – 192.168.255.255Most home routers use this. Not routed on the internet.
127.0.0.0/8Loopback127.0.0.0 – 127.255.255.255Always means 'this computer' (localhost is 127.0.0.1).
169.254.0.0/16Link-local (APIPA)169.254.0.0 – 169.254.255.255Self-assigned when DHCP fails. Only works on the local link.
100.64.0.0/10Carrier-grade NAT100.64.0.0 – 100.127.255.255Shared address space used by ISPs.
224.0.0.0/4Multicast224.0.0.0 – 239.255.255.255One sender to many listeners.
0.0.0.0/8This network0.0.0.0 – 0.255.255.2550.0.0.0 means 'any / unspecified'.
192.0.2.0/24Documentation192.0.2.0 – 192.0.2.255Safe example addresses (TEST-NET-1).
198.51.100.0/24Documentation198.51.100.0 – 198.51.100.255Safe example addresses (TEST-NET-2).
203.0.113.0/24Documentation203.0.113.0 – 203.0.113.255Safe example addresses (TEST-NET-3).
255.255.255.255/32Limited broadcast255.255.255.255 – 255.255.255.255Sent to everyone on the local network.
::1/128Loopback::1 –IPv6 'this computer'.
::/128Unspecified:: –No address yet / any address.
fe80::/10Link-localfe80:: –Automatic address on every IPv6 interface. Local link only.
fc00::/7Unique local (ULA)fc00:: –IPv6 private addresses, like 10.0.0.0/8 for IPv4.
2000::/3Global unicast2000:: –Normal internet-routable IPv6 addresses.
ff00::/8Multicastff00:: –One sender to many listeners (replaces broadcast).
2001:db8::/32Documentation2001:db8:: –Safe example addresses for manuals and labs.
::ffff:0:0/96IPv4-mapped::ffff:0:0 –An IPv4 address written inside an IPv6 address.
64:ff9b::/96NAT6464:ff9b:: –Lets IPv6-only hosts reach IPv4 servers.
New to IP addressing? Start here

An IP address identifies a device on a network, like a postal address. IPv4 addresses look like 192.168.1.10; IPv6 addresses look like 2001:db8::1.

A subnet is a group of addresses that sit together on one network. The /24 after the address (CIDR notation) says how many of the address's bits are the network part. A bigger number means a smaller subnet.

Type an address with a prefix, e.g. 192.168.1.77/24. IPv4 needs the prefix; for IPv6 a missing prefix means /128 (one address).

Network
192.168.1.0/24
Netmask
255.255.255.0
Wildcard
0.0.0.255
Broadcast
192.168.1.255
First usable
192.168.1.1
Last usable
192.168.1.254
Total addresses
256
Usable hosts
254

Binary view: dark boxes are network bits (fixed), light boxes are host bits (free to change). Click a box, or use the slider, to move the boundary.

How was this calculated? (step by step)
  1. An IPv4 address is really one 32-bit number, written as four 8-bit chunks (octets) for humans. 192.168.1.77 in binary is:

    11000000.10101000.00000001.01001101
  2. The "/24" means the first 24 bits identify the network (which street you are on) and the remaining 8 bits identify the host (which house on that street). The mask is 24 ones followed by 8 zeros:

    11111111.11111111.11111111.00000000
    = 255.255.255.0
  3. Network address: keep the network bits and set every host bit to 0 (a bitwise AND of the address and the mask). The bar "|" below marks the split.

    address 11000000.10101000.00000001|01001101
    network 11000000.10101000.00000001|00000000
    = 192.168.1.0
  4. Broadcast address: keep the network bits and set every host bit to 1. Packets sent here reach everyone on the subnet.

    broadcast 11000000.10101000.00000001|11111111
    = 192.168.1.255
  5. Wildcard mask is the mask flipped (ones become zeros). Routers and access lists use it to say "ignore these bits": 0.0.0.255.

  6. Total addresses = 2 to the power of the host bits = 2^8 = 256.

  7. Usable hosts = total - 2, because the first address (192.168.1.0) names the network itself and the last (192.168.1.255) is the broadcast. So 256 - 2 = 254, from 192.168.1.1 to 192.168.1.254.