Subnet calculator

IPv4 and IPv6. Worked out in your browser; nothing is sent anywhere.

Like 192.168.1.37/24 or 10.0.0.5 255.255.255.0. The answer updates as you type.
Try:

254 usable addresses · a private range, used inside home and office networks

Network192.168.1.0/24
First host192.168.1.1
Last host192.168.1.254
Broadcast192.168.1.255
Subnet mask255.255.255.0

How subnets work

How to read a CIDR prefix

The number after the slash is how many leading bits of the address are fixed. A /24 fixes the first 24 bits, so 192.168.1.0/24 covers 192.168.1.0 through 192.168.1.255: 256 addresses, of which 254 are usable once the network address and the broadcast address are set aside. Each step down in the prefix doubles the block, so a /23 is 512 addresses and a /16 is 65,536.

Subnet mask and wildcard mask

The subnet mask writes the same prefix as four octets: /24 is 255.255.255.0, /20 is 255.255.240.0. The wildcard mask is its inverse, 0.0.0.255 for a /24, and is what Cisco access lists and OSPF network statements expect. Both are derived from the prefix, which is why the calculator accepts any of the three forms.

Private, public and the addresses in between

The answer's first line says whether an address is globally routable or belongs to one of the reserved ranges: RFC 1918 private space (10/8, 172.16/12, 192.168/16), the 100.64/10 carrier-grade NAT range that many ISPs now hand out instead of a public address, link-local 169.254/16 that a device assigns itself when DHCP fails, and the documentation and benchmarking blocks that should never appear on a real network. If your router's WAN address starts with 100.64 through 100.127, you are behind carrier-grade NAT and inbound port forwarding will not work.

Common prefixes

The block sizes that come up most. Each step down in the prefix doubles the block.

PrefixSubnet maskAddressesUsable
/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

Questions

Why do /31 and /32 have no broadcast?

A /32 is one address, a single host or a loopback. A /31 is two addresses used for a point-to-point link between routers, where RFC 3021 does away with the network and broadcast addresses because nothing else can be on the link. Every other prefix loses two addresses to those roles.

How big is an IPv6 prefix?

IPv6 uses the same idea with 128-bit addresses. A /64 is the standard size for one LAN and holds 2^64 addresses: 18,446,744,073,709,551,616. An ISP typically delegates a /56 or /48 to a home or office, giving 256 or 65,536 individual /64 subnets. Under "More details" the calculator also shows the fully expanded form and the ip6.arpa reverse name, which is the nibble-reversed address that PTR records live under.

Why does a range need several blocks?

Firewalls, route tables and cloud security groups take CIDR blocks, not "from this address to that one". Given any start and end address the tool returns the smallest set of aligned blocks that covers exactly that range and nothing outside it. A range that starts or ends off a block boundary will need several blocks; that is normal.

Other tools

OUI · MA-L · MA-M · MA-S
MAC vendor lookup
Which company made the device behind a hardware address, from the IEEE registry. Spots randomised private addresses too.
X.509 · PKCS#10 · PEM · DER
Certificate and CSR decoder
Subject, issuer, validity, key, SANs, key usage and fingerprints from a certificate or signing request. Parsed in your browser.
VPN · resolver · privacy
DNS leak test
Which DNS servers actually answer your lookups on this connection, who owns them, and whether your VPN or private DNS is really being used.
Cloudflare · Google · Quad9 · 8 resolvers
DNS benchmark
Times eight public resolvers from where you are, over DNS-over-HTTPS, and ranks them by median response.
TCP · UDP · what is this port
Port lookup
What a port number is used for, which home devices open it, and whether it matters that it is reachable.
Certificate Transparency · CT logs
Subdomain finder
Every subdomain on a currently valid TLS certificate, from the public Certificate Transparency logs, with the ones worth a second look flagged.
IP to ASN · BGP · IP ranges
ASN lookup
Which network routes an IP address, who holds an AS number, and every IPv4 and IPv6 range it announces. Live BGP data from RIPEstat.
HTTP archive
HAR analyzer
Open a HAR file and see what a page really loaded: third parties, slowest requests, insecure cookies, servers that leak versions.
IIS · nginx · Apache · access logs
Log analyzer
Check IIS, nginx and Apache access logs for signs of exploitation, with a verdict per CVE and every finding traced to its line. Read in your browser, never uploaded.
Public IP · fingerprint
What is my IP
Your public address and everything else your browser hands to every site you visit, without asking.