A quick reference subnet cheat sheet with netmask and CIDR examples. Refer to it instead of trying to do the math each time. Enjoy.

CIDR

You may have seen or heard of CIDR notation. But what is it ? CIDR stand for Classless Inter-Domain Routing. The goal of cidr notation of a subnet is to simplify the allocation and the routing of IP adresses. It was created in 1993 by the Internet Engineering Task Force. It is based on variable-length subnet masking (VLSM) which allows the specification of arbitrary-length prefixes. CIDR introduced a new method of representation for IP addresses, now commonly known as CIDR notation

CIDR Notation

The standard notation consist of a prefix and a suffix. This compact method of representation of an IP adress would look as follow:

192.0.1.0/24 for IPv4, and 2001:db8::/32 for IPv6

IPV4 subnet cheat sheet:

CIDRAddressesHostsNetmaskAmount of a Class C
/3042255.255.255.2521/64
/2986255.255.255.2481/32
/281614255.255.255.2401/16
/273230255.255.255.2241/8
/266462255.255.255.1921/4
/25128126255.255.255.1281/2
/24256254255.255.255.01
/23512510255.255.254.02
/2210241022255.255.252.04
/2120482046255.255.248.08
/2040964094255.255.240.016
/1981928190255.255.224.032
/181638416382255.255.192.064
/173276832766255.255.128.0128
/166553665534255.255.0.0256

IPV6 Subnet Cheat Sheet

SubnetAddressesAmount of a /64
/1281
/1272
/1264
/1258
/12416
/12332
/12264
/121128
/120256
/119512
/1181,024
/1172,048
/1164,096
/1158,192
/11416,384
/11332,768
/11265,536
/111131,072
/110262,144
/109524,288
/1081,048,576
/1072,097,152
/1064,194,304
/1058,388,608
/10416,777,216This is equivalent to an IPv4 Internet or IPv4 /8
/10333,554,432
/10267,108,864
/101134,217,728
/100268,435,456
/99536,870,912
/981,073,741,824
/972,147,483,648
/964,294,967,296
/958,589,934,592
/9417,179,869,184
/9334,359,738,368
/9268,719,476,736
/91137,438,953,472
/90274,877,906,944
/89549,755,813,888
/881,099,511,627,776
/872,199,023,255,5521/8,388,608
/864,398,046,511,1041/4,194,304
/858,796,093,022,2081/2,097,152
/8417,592,186,044,4161/1,048,576
/8335,184,372,088,8321/524,288
/8270,368,744,177,6641/262,144
/81140,737,488,355,3281/131,072
/80281,474,976,710,6561/65,536
/79562,949,953,421,3121/32,768
/781,125,899,906,842,6201/16,384
/772,251,799,813,685,2401/8,192
/764,503,599,627,370,4901/4,096
/759,007,199,254,740,9901/2,048
/7418,014,398,509,481,9001/1,024
/7336,028,797,018,963,9001/512
/7272,057,594,037,927,9001/256
/71144,115,188,075,855,0001/128
/70288,230,376,151,711,0001/64
/69576,460,752,303,423,0001/32
/681,152,921,504,606,840,0001/16
/672,305,843,009,213,690,0001/8
/664,611,686,018,427,380,0001/4
/659,223,372,036,854,770,0001/2
/6418,446,744,073,709,500,000This is the standard end user allocation
/6336,893,488,147,419,100,0002
/6273,786,976,294,838,200,0004
/61147,573,952,589,676,000,0008
/60295,147,905,179,352,000,00016
/59590,295,810,358,705,000,00032
/581,180,591,620,717,410,000,00064
/572,361,183,241,434,820,000,000128
/564,722,366,482,869,640,000,000256
/559,444,732,965,739,290,000,000512
/5418,889,465,931,478,500,000,0001,024
/5337,778,931,862,957,100,000,0002,048
/5275,557,863,725,914,300,000,0004,096
/51151,115,727,451,828,000,000,0008,192
/50302,231,454,903,657,000,000,00016,384
/49604,462,909,807,314,000,000,00032,768
/481,208,925,819,614,620,000,000,00065,536 This is the standard business allocation
/472,417,851,639,229,250,000,000,000131,072
/464,835,703,278,458,510,000,000,000262,144
/459,671,406,556,917,030,000,000,000524,288
/4419,342,813,113,834,000,000,000,0001,048,576
/4338,685,626,227,668,100,000,000,0002,097,152
/4277,371,252,455,336,200,000,000,0004,194,304
/41154,742,504,910,672,000,000,000,0008,388,608
/40309,485,009,821,345,000,000,000,00016,777,216
/39618,970,019,642,690,000,000,000,00033,554,432
/381,237,940,039,285,380,000,000,000,00067,108,864
/372,475,880,078,570,760,000,000,000,000134,217,728
/364,951,760,157,141,520,000,000,000,000268,435,456
/359,903,520,314,283,040,000,000,000,000536,870,912
/3419,807,040,628,566,000,000,000,000,0001,073,741,824
/3339,614,081,257,132,100,000,000,000,0002,147,483,648
/3279,228,162,514,264,300,000,000,000,0004,294,967,296 This is the standard ISP Allocation
/31158,456,325,028,528,000,000,000,000,0008,589,934,592
/30316,912,650,057,057,000,000,000,000,00017,179,869,184
/29633,825,300,114,114,000,000,000,000,00034,359,738,368
/281,267,650,600,228,220,000,000,000,000,00068,719,476,736
/272,535,301,200,456,450,000,000,000,000,000
/265,070,602,400,912,910,000,000,000,000,000
/2510,141,204,801,825,800,000,000,000,000,000
/2420,282,409,603,651,600,000,000,000,000,000
/2340,564,819,207,303,300,000,000,000,000,000
/2281,129,638,414,606,600,000,000,000,000,000
/21162,259,276,829,213,000,000,000,000,000,000
/20324,518,553,658,426,000,000,000,000,000,000
/19649,037,107,316,853,000,000,000,000,000,000
/181,298,074,214,633,700,000,000,000,000,000,000
/172,596,148,429,267,410,000,000,000,000,000,000
/165,192,296,858,534,820,000,000,000,000,000,000
/1510,384,593,717,069,600,000,000,000,000,000,000
/1420,769,187,434,139,300,000,000,000,000,000,000
/1341,538,374,868,278,600,000,000,000,000,000,000
/1283,076,749,736,557,200,000,000,000,000,000,000
/11166,153,499,473,114,000,000,000,000,000,000,000
/10332,306,998,946,228,000,000,000,000,000,000,000
/9664,613,997,892,457,000,000,000,000,000,000,000
/81,329,227,995,784,910,000,000,000,000,000,000,000

 

So know you know. When a web hosting company provides a CIDR notation ip adresses range, you are in measure to compare.