Free tool · IPv4 & IPv6

Subnet calculator

Enter an address with its prefix length to get the network, host range, netmask and size of the subnet.

IPv4 or IPv6 in CIDR notation, e.g. 10.0.0.0/8 or 2001:db8::/48. Runs in your browser.

Building this into an app? Use the IP lookup API and its API quickstart.

Common IPv4 subnets

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

Frequently asked questions

How many hosts are in a /24?

A /24 has 256 addresses; 254 can be used for hosts because the network address and the broadcast address are reserved.

What is a wildcard mask?

The inverse of the netmask (0.0.0.255 for 255.255.255.0). Cisco ACLs and OSPF configurations use it.

How big is an IPv6 /64?

2^64 addresses (about 18 quintillion). /64 is the standard size of a single IPv6 network segment; providers usually assign a /48 or /56 to a customer.

IP geolocation API

Get this data in your app

ipbase returns location, ISP, ASN and time zone for any IPv4 or IPv6 address, up to 1,000 addresses per POST request. Security flags (VPN, proxy, Tor, data center) are on the Small plan and above.

Read the documentation

150 free requests every month. No credit card required.

GET https://api.ipbase.com/v2/info?ip=1.1.1.1

{
  "data": {
    "ip": "1.1.1.1",
    "type": "v4",
    "connection": {
      "asn": 13335,
      "organization": "APNIC and Cloudflare DNS Resolver project",
      "isp": "Cloudflare, Inc",
      "range": "1.1.1.0/24"
    },
    "location": {
      "country": { "alpha2": "AU", "name": "Australia" },
      "zip": "4000"
    },
    "security": { "is_vpn": null, "is_tor": null, "threat_score": null }
  }
}

Free IP tools

Example lookups: 8.8.8.8 · 8.8.8.0/24 · AS15169 · example.com · all IPv4 ranges

Get your free IP geolocation API key

Start with 150 free requests a month