# Subnet Calculator (IPv4 & IPv6)

> Free IPv4 and IPv6 subnet calculator. Enter a CIDR or mask to get network, broadcast, host range, wildcard and host count, and split into subnets.

- URL: https://tools.crawlink.com/subnet-calculator
- Category: Developer Tools
- Price: Free, no account, no usage limits
- Privacy: Runs entirely in your browser and works offline. Nothing you enter or upload leaves your device.

## What it does

Type an IP address with a prefix length (192.168.1.10/24) or a dotted subnet mask (10.0.0.1 255.255.240.0), or an IPv6 prefix such as 2001:db8::/48. The calculator ANDs the address with the mask to find the network, sets the host bits to find the last address and broadcast, and counts the addresses and usable hosts. It also shows the wildcard mask, address type, binary form and reverse DNS zone, and splits the block into smaller subnets. All maths uses exact 128-bit integers in your browser.

## Features

- IPv4 and IPv6 with exact BigInt maths
- CIDR prefix or dotted subnet mask input
- Usable hosts with /31 and /32 handled per RFC 3021
- Address type: private, CGNAT, link-local, ULA, documentation…
- Binary mask and reverse DNS zone
- Split into equal subnets

## How to use

1. Enter an address with /prefix or a subnet mask (or pick an example).
2. Read the network, broadcast, first and last usable host, mask, wildcard and host count.
3. To divide the block, choose a longer prefix under Split into subnets.
4. Copy any value by clicking it.

## FAQ

### How many usable hosts are in a /24?

A /24 has 256 addresses (2 to the power of 32 − 24). In IPv4 the first is the network address and the last is the broadcast address, so 254 can be assigned to hosts. In general usable hosts = 2^(32 − prefix) − 2 for prefixes up to /30.

### What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask: 0 bits must match and 1 bits can be anything. For 255.255.255.0 the wildcard is 0.0.0.255. Cisco access lists and OSPF network statements use wildcard masks.

### Why do /31 and /32 have no broadcast address?

A /32 is a single host route. RFC 3021 allows /31 networks on point-to-point links, where both addresses are usable and there is no network or broadcast address, which saves address space.

### Which IPv4 ranges are private?

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. 100.64.0.0/10 is shared address space for carrier-grade NAT, and 169.254.0.0/16 is link-local (APIPA). These are not routed on the public internet.

### How are IPv6 subnets usually sized?

A single LAN normally gets a /64, which SLAAC needs. Sites commonly receive a /48 or /56 from their provider, giving 65,536 or 256 /64 subnets. IPv6 has no broadcast address; the all-zero host address is reserved as the subnet-router anycast address.

Also searched as: subnet calculator, cidr calculator, ip subnet calculator, ipv6 subnet calculator, subnet mask calculator, ip range calculator, wildcard mask calculator, vlsm calculator.

## Related tools

- [Number Base Converter](https://tools.crawlink.com/number-base-converter): Binary, hex, decimal and bitwise operations
- [Unix Timestamp Converter](https://tools.crawlink.com/timestamp-converter): Convert between epoch timestamps and human dates
- [Hash Generator](https://tools.crawlink.com/hash-generator): MD5, SHA, SHA-3 and HMAC checksums for text and files
- [UUID Generator](https://tools.crawlink.com/uuid-generator): Generate RFC 4122 version 4 UUIDs in bulk
- [cURL to Code Converter](https://tools.crawlink.com/curl-to-code): Convert a curl command to fetch, Axios, Python requests, Go or PHP

---
Part of Tools by Crawlink — https://tools.crawlink.com/ · All tools: https://tools.crawlink.com/llms.txt
