Skip to content

Subnet Calculator

Get the network, mask, broadcast and host range for any IPv4 or IPv6 CIDR block.

Enter an IP address with a prefix, e.g. 192.168.1.0/24.
Runs in your browser — your data is not uploaded.

How to use

  1. Enter an IPv4 or IPv6 address with a CIDR prefix in IP address or CIDR.
  2. If you entered an address without a prefix, choose one from Prefix.
  3. Keep Show binary checked to see the IPv4 address, netmask and network in binary, with the network bits underlined.
  4. Choose a longer prefix in Split into to divide the network into smaller subnets.
  5. Click Download CSV to save the split subnet list.

Examples

Find the subnet for a home network device

Input
192.168.1.10/24
Output
Address: 192.168.1.10
Network: 192.168.1.0/24
Netmask: 255.255.255.0
Wildcard mask: 0.0.0.255
Broadcast: 192.168.1.255
First usable host: 192.168.1.1
Last usable host: 192.168.1.254
Total addresses: 256
Usable hosts: 254
Address type: Private (RFC 1918)
Legacy class: C
Integer: 3232235786
Hex: 0xC0A8010A
Host bits are set. The network is 192.168.1.0/24.

Split a private /8 network into /16 subnets

Input
10.0.0.0/8
Output
Address: 10.0.0.0
Network: 10.0.0.0/8
Netmask: 255.0.0.0
Wildcard mask: 0.255.255.255
Broadcast: 10.255.255.255
First usable host: 10.0.0.1
Last usable host: 10.255.255.254
Total addresses: 16777216 (2^24)
Usable hosts: 16777214
Address type: Private (RFC 1918)
Legacy class: A
Integer: 167772160
Hex: 0x0A000000

256 × /16 subnets
10.0.0.0/16 | 10.0.0.1 – 10.0.255.254 | 10.0.255.255 | 65534
…
10.255.0.0/16 | 10.255.0.1 – 10.255.255.254 | 10.255.255.255 | 65534

Inspect an IPv6 /48 address range

Input
2001:db8::/48
Output
Address: 2001:db8::
Expanded: 2001:0db8:0000:0000:0000:0000:0000:0000
Network: 2001:db8::/48
Prefix mask: ffff:ffff:ffff::
Address range: 2001:db8:: – 2001:db8:0:ffff:ffff:ffff:ffff:ffff
Total addresses: 1208925819614629174706176 (2^80)
Address type: Documentation (RFC 3849)

IPv4 subnet mask reference

Show the table for /0 – /32
PrefixNetmaskWildcardAddressesUsable hosts
/00.0.0.0255.255.255.25542949672964294967294
/1128.0.0.0127.255.255.25521474836482147483646
/2192.0.0.063.255.255.25510737418241073741822
/3224.0.0.031.255.255.255536870912536870910
/4240.0.0.015.255.255.255268435456268435454
/5248.0.0.07.255.255.255134217728134217726
/6252.0.0.03.255.255.2556710886467108862
/7254.0.0.01.255.255.2553355443233554430
/8255.0.0.00.255.255.2551677721616777214
/9255.128.0.00.127.255.25583886088388606
/10255.192.0.00.63.255.25541943044194302
/11255.224.0.00.31.255.25520971522097150
/12255.240.0.00.15.255.25510485761048574
/13255.248.0.00.7.255.255524288524286
/14255.252.0.00.3.255.255262144262142
/15255.254.0.00.1.255.255131072131070
/16255.255.0.00.0.255.2556553665534
/17255.255.128.00.0.127.2553276832766
/18255.255.192.00.0.63.2551638416382
/19255.255.224.00.0.31.25581928190
/20255.255.240.00.0.15.25540964094
/21255.255.248.00.0.7.25520482046
/22255.255.252.00.0.3.25510241022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

/31 networks are point-to-point links (RFC 3021) with two usable addresses; /32 is a single host.

FAQ

Can I enter a subnet mask instead of CIDR notation?

For IPv4, enter the address and dotted netmask separated by a space or slash, such as 172.16.5.4 255.255.240.0. The mask must have contiguous 1-bits; a mask such as 255.0.255.0 is invalid.

How many usable IP addresses are in a /31?

An IPv4 /31 has two usable addresses for a point-to-point link under RFC 3021, with no broadcast address. A /32 represents a single host.

Why is there no broadcast address for IPv6?

IPv6 has no broadcast address. The calculator shows the full address range and total address count instead of separate broadcast and usable-host rows.

How many subnets can I split a network into?

You can split up to 16 bits beyond the original prefix, producing up to 65,536 subnets. The on-page table shows the first 1,024 rows; the CSV includes up to 65,536 rows.

Is my IP address uploaded or saved?

Calculations run in your browser, and the entered address is not uploaded. It is written into the URL hash, so it remains in browser history and copied links; options are saved in localStorage, but the address is not.