Advanced

CIDR Calculator — IPv4 Block & Subnet Division

Enter a CIDR block in IP/prefix notation to see its network and broadcast addresses, usable host range, host count and how many smaller subnets you can carve from it.
IPv4 address followed by prefix, e.g. 192.168.1.0/24
Must be larger than the block prefix (e.g. /8 → /24 gives 65,536 subnets)
Usable host addresses
16.777.214

Network 10.0.0.0/8 — total 16.777.216

Network address
10.0.0.0
Broadcast address
10.255.255.255
First host
10.0.0.1
Last host
10.255.255.254
Subnet mask
255.0.0.0
Total addresses
16.777.216
Subnets (/24)
65.536
Hosts per subnet
254
100%
0%
Usable hosts
Reserved (net + broadcast)
/8 block — usable vs reserved out of 16.777.216 total addresses
Step by step
  1. 1

    Host bits

    32 − 8 = 24
    Bits not consumed by the network prefix — these identify individual hosts.
  2. 2

    Total addresses

    2^24 = 16.777.216
  3. 3

    Usable host addresses

    16.777.216 − 2 = 16.777.214
    Network address and broadcast address are reserved and cannot be assigned.
Resultaterne er skøn, der kun gives til generel information og er ikke professionel rådgivning — verificér altid vigtige resultater uafhængigt, før du forlader dig på dem. Læs hele ansvarsfraskrivelsen.
Hurtigt svar

Hvordan fungerer denne lommeregner?

Enter an IPv4 CIDR block (IP/prefix) to instantly get the network address, broadcast, first and last host, subnet mask, total and usable addresses. Optionally enter a longer prefix to see how many equal-sized subnets you can create and how many hosts each will have. Usable hosts = 2^(32−prefix) − 2.

Formel
mask = 0xFFFFFFFF << (32−prefix); network = IP & mask; broadcast = network | ~mask; usable = 2^(32−prefix) − 2; subnets = 2^(new_prefix − prefix)
How this is calculated

CIDR (Classless Inter-Domain Routing) notation compactly expresses an IP address block as a starting IP address and a prefix length, such as 10.0.0.0/8 or 192.168.1.0/24. The prefix length (0–32) tells you how many leading bits identify the network; the remaining bits identify hosts. A /24 block has 8 host bits, giving 256 total addresses (2⁸) and 254 usable hosts (subtract network and broadcast).

The subnet mask is built by shifting 32 ones left by (32−prefix) bits. ANDing the IP with the mask zeros the host bits and yields the network address; ORing the network with the inverted mask sets all host bits to 1, giving the broadcast address. The first usable host is network+1 and the last is broadcast−1. For /31 and /32 the usable count follows RFC 3021: a /31 has 2 usable addresses (point-to-point links), a /32 has 1 (a host route).

The subnet division field lets you choose a longer prefix to split the block into equal sub-blocks. A /8 block divided into /24 subnets yields 2^(24−8) = 65,536 subnets, each with 254 usable hosts. Each successive bit borrowed doubles the subnet count and halves the host count. This is the fundamental CIDR subnetting trade-off used in IP address planning.

Ofte stillede spørgsmål

192.168.0.0/24 is a CIDR block where the first 24 bits are the network ID, leaving 8 bits for hosts. That gives 256 total addresses (192.168.0.0–192.168.0.255), with 254 usable — the network address 192.168.0.0 and broadcast 192.168.0.255 are reserved.

A /26 has a 2-bit wider host boundary than a /24, so you get 2^(26−24) = 4 subnets. Each /26 has 64 total addresses and 62 usable hosts. The four subnets cover .0–.63, .64–.127, .128–.191 and .192–.255.

The first address in any subnet is reserved as the network identifier and the last as the broadcast address; neither can be assigned to a device. That is why usable hosts = 2^(32−prefix) − 2 for prefixes /30 and shorter. /31 and /32 are exceptions defined by RFC 3021.

Også kendt som

cidr block calculator
ipv4 cidr calculator
subnet cidr calculator
ip address range calculator
cidr to ip range
subnetting calculator
network address cidr

APA

TG we-Calculate Editorial Team. (2026). CIDR Calculator — IPv4 Block & Subnet Division [Online calculator]. TG we-Calculate. https://we-calculate.com/da/calculator/cidr-calculator

Chicago

TG we-Calculate Editorial Team. "CIDR Calculator — IPv4 Block & Subnet Division." TG we-Calculate. 2026. https://we-calculate.com/da/calculator/cidr-calculator.

IEEE

TG we-Calculate Editorial Team, "CIDR Calculator — IPv4 Block & Subnet Division," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/da/calculator/cidr-calculator

BibTeX

@misc{wecalculate_cidr_calculator, title = {CIDR Calculator — IPv4 Block & Subnet Division}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/da/calculator/cidr-calculator}}, year = {2026}, note = {TG we-Calculate} }

Hjalp denne lommeregner dig?