MSP NETPROTECT / TOOLS

Subnet Mask Cheat Sheet

IPv4 and IPv6 in one place. Calculate address ranges and explore the prefix reference tables.

IPv4 CALCULATOR

Understand the network.

IPv4 / CIDR

The right mask at a glance.

Select a prefix to use it in the calculator.

IPv4 reference: prefix, mask, wildcard and capacity
CIDRSubnet maskWildcardTotal addressesUsable hosts
255.255.255.2550.0.0.011 · host
255.255.255.2540.0.0.122 · P2P
255.255.255.2520.0.0.342
255.255.255.2480.0.0.786
255.255.255.2400.0.0.151614
255.255.255.2240.0.0.313230
255.255.255.1920.0.0.636462
255.255.255.1280.0.0.127128126
255.255.255.00.0.0.255256254
255.255.254.00.0.1.255512510
255.255.252.00.0.3.2551,0241,022
255.255.248.00.0.7.2552,0482,046
255.255.240.00.0.15.2554,0964,094
255.255.224.00.0.31.2558,1928,190
255.255.192.00.0.63.25516,38416,382
255.255.128.00.0.127.25532,76832,766
255.255.0.00.0.255.25565,53665,534
255.254.0.00.1.255.255131,072131,070
255.252.0.00.3.255.255262,144262,142
255.248.0.00.7.255.255524,288524,286
255.240.0.00.15.255.2551,048,5761,048,574
255.224.0.00.31.255.2552,097,1522,097,150
255.192.0.00.63.255.2554,194,3044,194,302
255.128.0.00.127.255.2558,388,6088,388,606
255.0.0.00.255.255.25516,777,21616,777,214
254.0.0.01.255.255.25533,554,43233,554,430
252.0.0.03.255.255.25567,108,86467,108,862
248.0.0.07.255.255.255134,217,728134,217,726
240.0.0.015.255.255.255268,435,456268,435,454
224.0.0.031.255.255.255536,870,912536,870,910
192.0.0.063.255.255.2551,073,741,8241,073,741,822
128.0.0.0127.255.255.2552,147,483,6482,147,483,646
0.0.0.0255.255.255.2554,294,967,2964,294,967,294

Total addresses ≠ usable hosts

For /0–/30, the usual calculation subtracts the network and broadcast addresses. /31 has two hosts on a point-to-point link; /32 represents a single address. Counts are theoretical: special ranges, operator rules and cloud platform reservations can limit usable addresses.

Technical references: RFC 1878 ↗ · RFC 3021 ↗

IPv6 / 128 BIT

Plan your IPv6 prefixes.

Calculate address ranges and subnet counts. The reference table follows the structure of the RIPE NCC IPv6 Chart.

/48 → /6465 536/64 subnets inside a /48
IPv6 CALCULATOR

From prefix to subnets.

RIPE NCC / IPv6 CHART

How many subnets fit?

Prefixes /24–/64, as in the reference document. Select a prefix to use it in the calculator. “Remaining bits” = 128 − prefix.

Number of /48, /56 and /64 blocks inside each IPv6 prefix
Prefix/48 blocks/56 blocks/64 blocksRemaining bits
16M4G1T104
8M2G512G103
4M1G256G102
2M512M128G101
1M256M64G100
512K128M32G99
256K64M16G98
128K32M8G97
64K16M4G96
32K8M2G95
16K4M1G94
8K2M512M93
4K1M256M92
2K512K128M91
1K256K64M90
512128K32M89
25664K16M88
12832K8M87
6416K4M86
328K2M85
164K1M84
82K512K83
41K256K82
2512128K81
125664K80
—12832K79
—6416K78
—328K77
—164K76
—82K75
—41K74
—251273
—125672
——12871
——6470
——3269
——1668
——867
——466
——265
——164

K = 1 024 · M = 1 048 576 · G = 1 073 741 824 · T = 1 099 511 627 776
Base-2 abbreviations, using RIPE NCC notation; full values appear when hovering over numbers. “—” means a block of that size does not fit inside the prefix.

128 bits. Hexadecimal notation.

A full address has 8 groups of 16 bits. Leading zeros can be omitted; :: compresses one sequence of zero groups.

Prefixes, no broadcast.

IPv6 uses a prefix length, such as /64. It has no broadcast addresses; multicast takes over their functions. The IPv4 “total − 2” formula does not apply.

/64 · /127 · /128

/64 is common for LANs with address autoconfiguration. /127 is used on point-to-point links between routers. /128 represents a single address.

Table source: RIPE NCC — IPv6 Chart. Technical references: RFC 4291 ↗ · RFC 5952 ↗ · RFC 6164 ↗

MSP NETPROTECT

From calculations to infrastructure.

We help you size your storage and design your business network.

Talk to the team