IP Subnet Calculator

IP Subnet Calculator

What is an IP subnet calculator?

The Subnet Calculator on UnwanIP helps analyze IPv4 and IPv6 addresses and calculate network information from an IP address and a CIDR prefix or subnet mask. It can be used to determine the network address, address range, number of addresses, subnet mask and other technical subnet information.

Subnet calculations are widely used for network administration, IP address planning, router configuration, firewall rules and organizing devices within business or local networks.

What is a subnet?

A subnet is a smaller logical network created from a larger IP network. Dividing a network into subnets can make address management easier, reduce broadcast domains and help organize devices and services.

The size of a subnet is defined using a subnet mask or CIDR prefix such as /24 or /64.

What is CIDR?

CIDR stands for Classless Inter-Domain Routing. It represents the network prefix length using a number after a slash.

For example, 192.168.1.0/24 describes an IPv4 network where 24 bits identify the network portion and the remaining bits identify addresses inside that network.

For IPv4, a larger CIDR prefix generally means a smaller subnet with fewer addresses.

What is a subnet mask?

A subnet mask is used in IPv4 to determine which part of an IP address identifies the network and which part identifies addresses within that network.

For example, the subnet mask 255.255.255.0 normally corresponds to /24 and leaves 8 bits for addresses inside the subnet.

The same network can therefore be represented using either a traditional subnet mask or CIDR notation.

What is a network address?

The network address is the first address in a subnet and represents the subnet itself. It is not normally assigned to a regular host.

The UnwanIP calculator automatically determines the network address from the IP address and CIDR prefix or subnet mask you enter.

What is a broadcast address?

In traditional IPv4 networks, the broadcast address is the last address in the subnet and can be used to send traffic to all hosts within that broadcast domain.

IPv6 does not use broadcast addresses in the same way. It uses mechanisms such as multicast instead.

What is the usable host range?

In many traditional IPv4 subnets, usable host addresses are located between the network address and the broadcast address.

For example, in 192.168.1.0/24, the network address is 192.168.1.0 and the broadcast address is 192.168.1.255. The traditional host range is therefore 192.168.1.1 through 192.168.1.254.

Special cases such as /31 and /32 follow different rules.

How many addresses are in an IPv4 subnet?

The number of addresses in an IPv4 subnet depends on the number of bits left after the CIDR prefix.

Examples include:

  • /24 contains 256 total addresses.
  • /25 contains 128 addresses.
  • /26 contains 64 addresses.
  • /27 contains 32 addresses.
  • /28 contains 16 addresses.
  • /29 contains 8 addresses.
  • /30 contains 4 addresses.

What is the difference between IPv4 and IPv6 subnet calculations?

IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses. This gives IPv6 a vastly larger address space.

IPv6 also normally uses prefix lengths such as /64 rather than traditional dotted-decimal subnet masks such as 255.255.255.0.

What can a subnet calculator be used for?

A subnet calculator can be useful for tasks such as:

  • Dividing a larger network into smaller subnets.
  • Determining available IP address ranges.
  • Configuring routers.
  • Planning firewall rules.
  • Designing IP addressing schemes.
  • Understanding CIDR and subnet masks.
  • Checking network and broadcast addresses.
  • Calculating the number of addresses in a subnet.

Frequently asked questions about subnetting

What does /24 mean in an IP address?

A /24 prefix means that the first 24 bits of an IPv4 address identify the network and 8 bits remain for addresses inside the subnet. It normally corresponds to the subnet mask 255.255.255.0.

How many IP addresses are in a /24 subnet?

An IPv4 /24 subnet contains 256 total addresses. In traditional subnetting, 254 are normally usable by hosts after excluding the network and broadcast addresses.

What is the difference between a subnet mask and CIDR?

Both describe the size of an IP network. A subnet mask uses a format such as 255.255.255.0, while CIDR uses a shorter prefix such as /24.

Does IPv6 have a broadcast address?

No. IPv6 does not use broadcast addresses in the same way as IPv4. Multicast is used for functions that require communication with groups of devices.

Can I use the calculator with any IPv4 address?

Yes. You can enter a valid IPv4 address and choose a CIDR prefix or subnet mask to calculate the corresponding network information.

Does the calculator support IPv6?

Yes. UnwanIP supports IPv6 subnet calculations and can analyze an IPv6 address using its prefix length and display the associated network information and address range.