/

IPv4 Subnet Calculator

Processed Client Side

Enter an IPv4 address with a CIDR prefix or a subnet mask to get the network and broadcast addresses, the usable host range, the wildcard mask, and a bit-level view of where the mask cuts.

IP address / CIDR
ipv4Length: 15Lines: 1Size: 15 BytesCursor: 1:1
Subnet details
Private (RFC 1918)
192.168.1.0/24Class C254 usable hosts
Addresses
Address192.168.1.10
Network192.168.1.0
Broadcast192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Host range192.168.1.1 - 192.168.1.254
Mask
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Prefix length/24
Network bits24
Host bits8
Counts
Total addresses256
Usable hosts254
IP classC
ScopePrivate (RFC 1918)
Binary■ network bits■ host bits
Address11000000.10101000.00000001.00001010
Subnet mask11111111.11111111.11111111.00000000
Network11000000.10101000.00000001.00000000
Broadcast11000000.10101000.00000001.11111111
Other notations
Integer (uint32)3232235786
Hexadecimal0xC0A8010A
in-addr.arpa10.1.168.192.in-addr.arpa
Prefix
Split into

Bookmark this tool now — skip the search next time you need it.

About IPv4 Subnet Calculator

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

The IPv4 Subnet Calculator turns a CIDR block into every number you need to configure a network: the network and broadcast addresses, the first and last usable host, how many hosts you get, and the subnet and wildcard masks in both dotted-decimal and binary. Feed it an address with a prefix, a dotted mask, or neither, and it also splits the block into equal smaller subnets so you can plan an allocation without binary arithmetic on paper. A prefix slider resizes the network live, the binary view colours network bits apart from host bits so you can see where the mask cuts, and reserved ranges such as RFC 1918 private space or carrier-grade NAT are named as soon as you paste an address inside one.

Key features

  • Accepts every common notation — 192.168.1.10/24, 10.0.0.5 255.255.255.0, 172.16.5.4/255.255.240.0, or a bare address treated as /32
  • Network address, broadcast address, first and last usable host, and the full host range
  • Total address count and usable host count, with /31 and /32 handled correctly under RFC 3021
  • Subnet mask, wildcard mask (the ACL form Cisco wants), prefix length, and the network/host bit split
  • Binary breakdown of the address, mask, network and broadcast, with the network bits and host bits coloured differently so you can see exactly where the mask cuts
  • Scope detection — RFC 1918 private, loopback, link-local/APIPA, carrier-grade NAT, documentation, multicast, and reserved ranges are all named
  • Legacy class (A/B/C/D/E), integer and hexadecimal forms, and the in-addr.arpa name for reverse DNS
  • Split a block into equal subnets at any longer prefix and get a table of every resulting network with its host range
  • A prefix slider that recalculates live, so you can feel the trade-off between subnet size and host count
  • Runs entirely in your browser — nothing is uploaded

How to use it

  1. Type or paste an IPv4 address with its prefix into the left pane, for example 192.168.1.10/24.
  2. Read the network details on the right — addresses, masks, counts, and the binary view.
  3. Drag the prefix slider, or pick a prefix from the dropdown, to see how the network resizes.
  4. To plan an allocation, choose a longer prefix in "Split into" and read the table of resulting subnets.
  5. Copy the whole report with the Copy button, or copy any single value with the icon beside it.

Tips & common mistakes

  • Usable hosts is always two fewer than total addresses for /30 and shorter: the first address identifies the network and the last is the broadcast address. A /24 gives 256 addresses but only 254 hosts.
  • A /31 is the exception. RFC 3021 makes both addresses usable on point-to-point links, which is why the calculator reports 2 usable hosts rather than 0.
  • The wildcard mask is the inverse of the subnet mask, and it is what Cisco ACLs and OSPF network statements expect — /24 is mask 255.255.255.0 but wildcard 0.0.0.255.
  • If you enter a host address rather than a network address, the network row shows the block it belongs to. 192.168.1.10/24 and 192.168.1.200/24 are the same network.
  • A dotted mask must be contiguous — all ones then all zeros. 255.255.0.255 is a valid-looking quad but not a valid mask, and the tool rejects it rather than guessing.
  • To halve a network, add one to the prefix; each extra bit doubles the number of subnets and halves the hosts in each. Splitting a /24 into /26s gives four subnets of 62 hosts.
  • The classful A/B/C labels are historical. Routing has been classless since CIDR arrived in 1993 — the prefix, not the first octet, decides the network size.

Related tools

Browse all 12 Development tools

Frequently asked questions

10

Type an address with its prefix, such as 192.168.1.10/24, into the left pane. The right pane immediately shows the network and broadcast addresses, the first and last usable host, the host count, the subnet and wildcard masks, and a binary view of where the mask cuts.

CIDR notation (192.168.1.10/24), an address with a dotted mask (10.0.0.5 255.255.255.0), a slash-mask form (172.16.5.4/255.255.240.0), and a bare address, which is treated as /32. Dotted masks must be contiguous — 255.255.0.255 is rejected rather than guessed at.

The first address in a block identifies the network itself and the last is the broadcast address, so neither can be assigned to a host. That costs you two addresses in every subnet of /30 or shorter — which is why a /30, with four addresses, gives just two usable hosts.

They are the exceptions. RFC 3021 allows both addresses of a /31 to be used on point-to-point links, so the calculator reports 2 usable hosts and no broadcast address. A /32 is a single host route — one address, no network or broadcast reserved.

It is the bitwise inverse of the subnet mask: /24 has mask 255.255.255.0 and wildcard 0.0.0.255. Cisco ACLs and OSPF network statements are written with wildcard masks rather than subnet masks, so having both side by side saves a conversion step.

Pick a longer prefix in the "Split into" dropdown. Each extra bit doubles the number of subnets and halves the hosts in each, so a /24 split into /26s gives four subnets of 62 usable hosts. The table lists every resulting network with its own host range and broadcast address.

The Scope row names it. The calculator recognises RFC 1918 private ranges (10/8, 172.16/12, 192.168/16), loopback, link-local/APIPA, carrier-grade NAT, the documentation TEST-NET ranges, multicast, and reserved Class E space — anything else is reported as globally routable.

The address, mask, network, and broadcast in binary, with the network bits highlighted and the host bits dimmed. It makes the prefix length concrete: you can see the exact bit where the network portion ends and the host portion begins, which is the whole idea behind CIDR.

Not for routing. Classful addressing was replaced by CIDR in 1993, so the prefix — not the first octet — determines the network size. The class is shown because older documentation, exam questions, and some vendor interfaces still refer to it.

No. Every calculation is plain 32-bit arithmetic done in JavaScript in your browser. Nothing is uploaded, so it is safe to work out internal addressing plans for private infrastructure here.