GATE 14 · SUBNET CALCULATOR

Calculate an IPv4 or IPv6 subnet

Quick answer: A subnet calculator turns CIDR notation, such as 192.168.1.0/24, into the details needed to plan a network. For IPv4 it shows the network and broadcast addresses, usable host range, host count and netmask. For an IPv6 prefix it shows the address range and how many /64 networks it contains.

GLOBEPROXY · SUBNET CALCULATORGATE 14

Examples: , , , ,

Network
192.168.1.0/24
Netmask
255.255.255.0
Wildcard
0.0.0.255
Broadcast
192.168.1.255
First host
192.168.1.1
Last host
192.168.1.254
Usable hosts
254
Total addresses
256
Class
C
Type
Private (RFC 1918)
Address (binary)
11000000.10101000.00000001.00000000
Mask (binary)
11111111.11111111.11111111.00000000
CALCULATEDIN YOUR BROWSER

Type an IPv4 block such as 192.168.1.0/24 to see its network, broadcast, host range and mask, or an IPv6 prefix such as 2001:db8::/48 to see its range and number of /64 networks.

The maths runs in your browser as you type. Nothing you enter is sent anywhere.

What a subnet calculator does

A subnet is a block of consecutive IP addresses. CIDR notation describes one with an address and a prefix length, for example 192.168.1.0/24. The number after the slash says how many bits at the start of the address identify the network. The remaining bits identify hosts inside it.

The calculator turns that short notation into the details you need when planning or debugging a network: the network address, the broadcast address, the first and last usable host, how many hosts fit, and the netmask in dotted form.

Reading the IPv4 result

  • Network address: the first address in the block, which names the subnet itself.
  • Broadcast address: the last address, used to reach every host on the subnet.
  • Usable hosts: the addresses between them. A /24 has 256 addresses and 254 usable hosts.
  • Netmask and wildcard: the same boundary written two ways. The wildcard is the netmask turned inside out and is used in some router access lists.
  • Binary view: the address and mask in bits, where you can see exactly where the network part ends.
  • Class and flags: the historical class A to E, and whether the block is private, loopback, link-local, shared CGNAT space or public.

Special cases

A /32 is a single address. A /31 holds two addresses with no network or broadcast, so both can be used, which suits links between two routers. A /0 covers the whole internet.

If you type a host address such as 172.16.5.4/20, the calculator shows the network it belongs to, 172.16.0.0/20, because the host bits are cleared.

IPv6 prefixes

IPv6 addresses are 128 bits, and networks are sized differently. A single network, such as a home LAN, normally gets a /64, which holds more than 18 quintillion addresses. Providers usually hand customers a /56 or /48, which contain 256 or 65,536 of those /64 networks. The IPv6 calculator shows the first and last address of a prefix and how many /64s it holds. Everything runs in your browser, and nothing you enter is sent anywhere.

Common uses

  • Planning how to divide a private network into separate subnets for offices, servers or guests.
  • Checking which addresses a firewall or access rule actually covers.
  • Working out the smallest block that fits a number of devices.
  • Converting between a prefix length such as /20 and a netmask such as 255.255.240.0.
  • Confirming whether an address falls inside a block your provider has assigned.

Frequently asked questions

How many hosts are in a /24?

A /24 has 256 addresses. Two are reserved, the network and broadcast addresses, which leaves 254 usable hosts.

What is a wildcard mask?

It is the inverse of the netmask. Where the netmask has ones the wildcard has zeros, and the other way round. Some routers use it in access lists.

Which ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private ranges for use inside networks. 100.64.0.0/10 is shared space used by providers for carrier-grade NAT.

Why is a /64 the standard IPv6 subnet?

Several IPv6 features, such as automatic address configuration, expect the host part to be 64 bits. Using a /64 for each network keeps those features working.

Is anything sent to a server?

No. The maths runs in your browser using plain code on this page.