Use this Subnet Calculator to determine the properties of a network subnet. The query can be in a number of forms including network CIDR addresses and IP with network mask.
Valid Input: IPv4 IPv6 example.com 8.8.8.8 2001:4860:4860::8888
What is this Subnet Calculator?
When working with networks it is often required to quickly calculate the network boundaries of a subnet from a CIDR address or subnet with network mask. CIDR notation format is a way to express IP addresses and their associated routing prefix. It appends a slash character to the address and the decimal number of leading bits of the routing prefix, e.g., 192.168.2.0/24 for IPv4, and 2001:db8::/32 for IPv6.
Format of the Subnet to Lookup
Enter the CIDR network address to lookup using one of the following formats.
192.168.1.0/24 10.10.0.0/16
IPv6 Subnet Lookup
Calculate IPv6 CIDR network addresses using the same format. Simply enter the IPv6 address and include a CIDR notation.
Here are some examples:
2a01:7e00::f03c:91ff:fe70:d437/64
API for the Subnet Calculator
In addition to the web form on this page, you are able to calculate a network subnet using the API endpoint.
Subnet Calculator API - Simple Text Response
curl -s https://api.hackertarget.com/subnetcalc/?q=192.168.1.0/24
Address = 192.168.1.0
Network = 192.168.1.0/24
Netmask = 255.255.255.0
Broadcast = 192.168.1.255
Wildcard Mask = 0.0.0.255
Hosts Bits = 8
Max. Hosts = 256
Host Range = 192.168.1.1 - 192.168.1.254
IP Class = C
CIDR Notation = 192.168.1.0/24
IP Version = IPv4
Is Private = Yes
DNS Hostname = No hostname found
Subnet Calculator API - JSON response
curl -s "https://api.hackertarget.com/subnetcalc/?q=192.168.1.0/24&output=json" | jq
{
"query": "192.168.1.0/24",
"address": "192.168.1.0",
"network": "192.168.1.0/24",
"netmask": "255.255.255.0",
"broadcast": "192.168.1.255",
"wildcard_mask": "0.0.0.255",
"hosts_bits": 8,
"max_hosts": 256,
"host_range": "192.168.1.1 - 192.168.1.254",
"is_private": true,
"ip_class": "C",
"cidr_notation": "192.168.1.0/24",
"ip_version": "IPv4",
"dns_hostname": "No hostname found"
}
The API is simple to use and aims to be a quick reference tool. Like all our IP Tools there is a limit of 50 queries per day or you can Remove limits with a Full Membership.
Vulnerability Scans and Network Intelligence
Use CasesEnumerate and Discover
Know the Network
28 vulnerability scanners and network tools
Membership