Country & language

Sets the currency, units and country-specific rules (tax, VAT, salary) in calculators. General tools stay the same.

Pages that are not translated yet open in English.

↑ ↓ to move · Enter to open · Esc to close

IP Subnet Calculator

Paste an address with its prefix – 10.0.0.0/16 or 192.168.1.200/27 – to get the network, broadcast, host range and masks in decimal and binary. Then split the block into equal subnets, or list how many hosts each LAN needs and get a VLSM plan, largest subnet first.

Quick answer: 192.168.1.10/24 belongs to network 192.168.1.0 with subnet mask 255.255.255.0 and broadcast address 192.168.1.255, leaving 254 usable hosts (192.168.1.1 – 192.168.1.254). Usable hosts = 2^(32 − prefix) − 2.

Updated · Free · No sign-up

IP Subnet Calculator inputs

You can also type CIDR notation, such as 10.0.0.0/16.
/
Rounded up to a power of two – e.g. 4 subnets of a /24 are four /26 networks.
One number per subnet, separated by commas. Each gets the smallest block that fits, largest first.

Result

Network

192.168.1.0/24

254 usable hosts · Private (RFC 1918)

IP address192.168.1.10
Network address192.168.1.0
Broadcast address192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
CIDR notation/24
Total addresses
256
Usable hosts
254
IP class
C
Reverse DNS zone
1.168.192.in-addr.arpa

Binary view

Dotted decimalBinary
IP address192.168.1.1011000000.10101000.00000001.00001010
Subnet mask255.255.255.011111111.11111111.11111111.00000000
Wildcard0.0.0.25500000000.00000000.00000000.11111111
Network192.168.1.011000000.10101000.00000001.00000000
Broadcast192.168.1.25511000000.10101000.00000001.11111111

The first 24 bits are the network part; the remaining 8 bits number the hosts.

4 subnets of /26

#NetworkUsable rangeBroadcastHosts
1192.168.1.0/26192.168.1.1 – 192.168.1.62192.168.1.6362
2192.168.1.64/26192.168.1.65 – 192.168.1.126192.168.1.12762
3192.168.1.128/26192.168.1.129 – 192.168.1.190192.168.1.19162
4192.168.1.192/26192.168.1.193 – 192.168.1.254192.168.1.25562

Common prefix lengths

CIDRSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

How a subnet is worked out

An IPv4 address is 32 bits, written as four numbers from 0 to 255. The prefix length – the /24 in 192.168.1.10/24 – says how many of those bits, counted from the left, name the network; the rest number the hosts inside it. Since CIDR replaced the old A/B/C classes (RFC 4632), the prefix can be anything from /0 to /32, and the class shown by the calculator is only a historical label.

Network = IP AND mask  ·  Broadcast = network OR wildcard  ·  Wildcard = NOT mask

Addresses = 2^(32 − prefix)  ·  Usable hosts = addresses − 2 (except /31 and /32)

The first address of every subnet is the network address and the last is the broadcast address, so neither can be given to a device. That is why a /24 has 256 addresses but 254 hosts.

Worked examples

192.168.1.200/27 by hand

27 one-bits give the mask 255.255.255.224. The interesting octet is the fourth: 256 − 224 = 32, so subnets start at 0, 32, 64, 96, 128, 160, 192 and 224. 200 lies between 192 and 223, so the network is 192.168.1.192, the broadcast 192.168.1.223 and the hosts run from .193 to .222 – 30 usable. The wildcard is 0.0.0.31.

A classic exam question: 172.20.130.7/20

Here the boundary falls in the third octet. The mask is 255.255.240.0, so third-octet blocks are 256 − 240 = 16 wide: 112, 128, 144 … 130 is in the block starting at 128. Network 172.20.128.0, broadcast 172.20.143.255, hosts 172.20.128.1 to 172.20.143.254 – 4,096 addresses and 4,094 usable hosts, wildcard 0.0.15.255.

VLSM for a head office and branches

Say 192.168.10.0/24 must cover a head-office LAN of 100 devices, a branch of 50, a small office of 20 and a router-to-router link. Enter 100, 50, 20, 2 and the calculator sizes each one – 100 hosts need a /25 (126), 50 a /26 (62), 20 a /27 (30), 2 a /30 – and places them largest first: 192.168.10.0/25, 192.168.10.128/26, 192.168.10.192/27 and 192.168.10.224/30. That uses 228 of 256 addresses and leaves 28 from 192.168.10.228. Asking for 120, 60, 30, 30 and 2 hosts in a /24 needs 260 addresses, so the calculator says it doesn’t fit and that you need a /23.

Subnet cheat sheet

CIDRSubnet maskWildcardAddressesUsable hosts
/16255.255.0.00.0.255.25565,53665,534
/20255.255.240.00.0.15.2554,0964,094
/22255.255.252.00.0.3.2551,0241,022
/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 (point-to-point)
/32255.255.255.2550.0.0.011

Rules that change the answer

  • /31 and /32: under RFC 3021 a /31 has no network or broadcast address, so both addresses are hosts; a /32 is one host. The calculator shows “none” for their broadcast.
  • Equal splits round up: subnets come in powers of two, so asking for 5 or 6 subnets of a /24 gives eight /27s, and the heading tells you how many you asked for.
  • A /29 from your ISP: a block such as 203.0.113.8/29 has 6 usable addresses (.9 to .14), and your provider’s gateway normally takes one of them, leaving 5 for your own equipment.
  • Special ranges: the calculator flags private (RFC 1918), carrier-grade NAT (100.64.0.0/10), link-local (169.254.0.0/16), loopback, documentation and benchmarking (198.18.0.0/15) addresses, which are not reachable on the public internet.

Common mistakes

  • Forgetting the router: a LAN of 30 PCs plus a gateway is 31 hosts, which no longer fits a /27.
  • Allocating VLSM blocks smallest first. A /30 placed at .0 forces the next /25 up to .128 and wastes space – or overlaps if you start it at .4.
  • Typing a host address as the network in a route or ACL: 192.168.1.10/24 is a host; the route is 192.168.1.0/24.
  • Using 172.32.x.x as private space – the RFC 1918 block stops at 172.31.255.255.

Where public addresses come from

Public IPv4 space in the Gulf and the wider Middle East is managed by RIPE NCC, which made its last /22 allocation on 25 November 2019. New members can only join a waiting list for a single /24, so most businesses get public addresses from their ISP or buy them on the transfer market. Plan internal networks in RFC 1918 space and keep public blocks for what really needs them.

For production changes – re-addressing a live network, overlapping ranges after a merger or VPN, or routing a provider-assigned block – check the plan with your network team or provider before you apply it.

Frequently asked questions

How many usable hosts are in a /24, /27 or /29?

Take 2 to the power of the host bits and subtract 2 for the network and broadcast addresses: a /24 has 256 − 2 = 254, a /27 has 32 − 2 = 30 and a /29 has 8 − 2 = 6 usable hosts.

How do I turn a CIDR prefix into a subnet mask?

Write the prefix as that many 1-bits followed by 0-bits and read each group of 8 as a number. /20 is 11111111.11111111.11110000.00000000, which is 255.255.240.0. The only octet values a mask can have are 0, 128, 192, 224, 240, 248, 252, 254 and 255.

How do I find the network and broadcast address?

Use the block size, 256 minus the mask octet that isn’t 0 or 255. For 192.168.1.200/27 the mask is 255.255.255.224, so blocks are 32 wide; 200 falls in the block starting at 192 – network 192.168.1.192, broadcast 192.168.1.223, hosts .193 to .222.

What is a wildcard mask?

The subnet mask with every bit flipped – in decimal, 255 minus each octet. 255.255.240.0 becomes 0.0.15.255. Cisco ACLs and OSPF network statements use it: 0 bits must match, 1 bits can be anything.

Which IP address ranges are private?

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. 100.64.0.0/10 is different: RFC 6598 sets it aside for carrier-grade NAT inside an ISP, and it should not be used for an office LAN.

How do I split a /24 into four subnets?

Four subnets need 2 more network bits, so each becomes a /26 of 64 addresses: 192.168.1.0, .64, .128 and .192, each with 62 usable hosts. Asking for 5 subnets needs 3 bits, giving eight /27s of 30 hosts.

How does VLSM work?

Each subnet gets the smallest block that fits its hosts, allocated largest first so nothing overlaps. For LANs of 100, 50, 20 and 2 hosts in 192.168.10.0/24 that is .0/25, .128/26, .192/27 and .224/30 – 228 addresses used, 28 left from 192.168.10.228.

Can I use a /31 or a /32?

Yes. RFC 3021 lets a point-to-point link use a /31 with both addresses as hosts, saving two addresses per link compared with a /30. A /32 is a single address, used for loopback interfaces and host routes.

What changed

  • – Page fully reviewed: VLSM planning added (hosts per subnet, largest first, with addresses left or the prefix you need), documentation, benchmarking and limited-broadcast addresses now labelled; new worked examples, cheat sheet and sources.
  • – RIPE NCC, the registry that serves Europe and the Middle East including the Gulf states, made its final /22 IPv4 allocation; new members can now only join a waiting list for a single /24.

Sources

Last reviewed: · Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers