IP Subnet Calculator

Rate this post

IP Subnet Calculator-Use our free IP Subnet Calculator to calculate network address, broadcast address, subnet mask, CIDR, usable host range, and number of hosts for IPv4 networks.An IP Subnet Calculator helps you understand how an IPv4 network is divided into smaller subnetworks.Random Password Generator

🌐 IP Subnet Calculator - CalculatorGuides

📊 Subnet Calculation Details

Enter an IPv4 address and subnet mask or CIDR prefix, and the calculator can determine:

  • Network address
  • Broadcast address
  • Subnet mask
  • CIDR notation
  • First usable host
  • Last usable host
  • Number of addresses
  • Number of usable hosts
  • Wildcard mask
  • IP address range

This makes subnet calculations much easier than converting binary values manually.

Note: The calculations below focus on IPv4 subnetting. IPv6 uses a different addressing and subnetting model.

What Is an IP Subnet Calculator?

An IP Subnet Calculator is a networking tool that determines the important addresses and characteristics of an IPv4 subnet.

For example, if you enter:

192.168.1.25/24

the calculator can determine that the network is:

192.168.1.0/24

with a broadcast address of:

192.168.1.255

and a typical usable host range of:

192.168.1.1 – 192.168.1.254

What Is an IP Address?

An IPv4 address is a 32-bit number normally written as four decimal octets.

Example:

192.168.1.25

Each octet can range from:

0 to 255

because each octet contains 8 bits.

Therefore:

4 × 8 = 32 bits

in a standard IPv4 address.

What Is a Subnet?

A subnet, or subnetwork, is a logical subdivision of an IP network.

Subnetting allows a larger network to be divided into smaller networks.

For example:

192.168.1.0/24

can be divided into smaller subnets such as:

  • /25
  • /26
  • /27
  • /28

Each additional network prefix bit creates more, smaller subnets.

IP Subnet Calculator
IP Subnet Calculator

What Is CIDR?

CIDR stands for Classless Inter-Domain Routing.

CIDR notation represents an IP address followed by a slash and a prefix length.

Example:

192.168.1.0/24

The:

/24

means that the first 24 bits represent the network portion.

The remaining:

32 − 24 = 8 bits

are available for host addressing.

CIDR Prefix Length

IPv4 CIDR prefixes range from:

/0 to /32

Some common prefixes include:

CIDR Subnet Mask Total Addresses
/8 255.0.0.0 16,777,216
/16 255.255.0.0 65,536
/24 255.255.255.0 256
/25 255.255.255.128 128
/26 255.255.255.192 64
/27 255.255.255.224 32
/28 255.255.255.240 16
/29 255.255.255.248 8
/30 255.255.255.252 4
/31 255.255.255.254 2
/32 255.255.255.255 1

The number of usable host addresses depends on the subnet and addressing context.

Subnet Mask

A subnet mask identifies which bits of an IPv4 address belong to the network portion and which belong to the host portion.

For example:

255.255.255.0

is equivalent to:

/24

In binary:

11111111.11111111.11111111.00000000

The first 24 bits are network bits.

The final 8 bits are host bits.

Network Address

The network address identifies the subnet itself.

For example:

IP address:

192.168.1.25

Subnet mask:

255.255.255.0

Network address:

192.168.1.0

The host portion is set to zero to obtain the network address.

Broadcast Address

The broadcast address is the address used to represent all hosts on a traditional IPv4 subnet.

For:

192.168.1.0/24

the broadcast address is:

192.168.1.255

The host bits are set to one.

First Usable Host

For a typical IPv4 subnet where network and broadcast addresses are reserved:

First usable host = Network address + 1

For:

192.168.1.0/24

the first usable address is:

192.168.1.1

Last Usable Host

For a traditional subnet:

Last usable host = Broadcast address − 1

For:

192.168.1.0/24

the last usable address is:

192.168.1.254

Number of IPv4 Addresses

The total number of addresses in a subnet is:

2^(32 − Prefix Length)

For a /24 network:

2^(32 − 24)

= 2⁸

= 256 addresses

For a /26:

2⁶ = 64 addresses

Number of Usable Hosts

For many traditional IPv4 subnets:

Usable Hosts = Total Addresses − 2

The two excluded addresses are generally:

  • Network address
  • Broadcast address

For a /24:

256 − 2 = 254 usable hosts

For a /26:

64 − 2 = 62 usable hosts

However, special cases such as /31 point-to-point networks and /32 host routes require different treatment.

IP Subnet Calculator Example

Suppose the input is:

192.168.10.50/24

The calculator determines:

Network: 192.168.10.0

Broadcast: 192.168.10.255

Subnet Mask: 255.255.255.0

First Host: 192.168.10.1

Last Host: 192.168.10.254

Total Addresses: 256

Typical Usable Hosts: 254

/25 Subnet Calculator

A /25 subnet has:

128 total addresses

because:

2^(32 − 25) = 128

A typical /25 subnet has:

126 usable hosts

Example:

192.168.1.0/25

Range:

192.168.1.0 – 192.168.1.127

Broadcast:

192.168.1.127

Usable hosts:

192.168.1.1 – 192.168.1.126

/26 Subnet Calculator

A /26 has:

64 total addresses

and typically:

62 usable hosts

Example:

192.168.1.0/26

Range:

192.168.1.0 – 192.168.1.63

Broadcast:

192.168.1.63

Usable range:

192.168.1.1 – 192.168.1.62

/27 Subnet Calculator

A /27 contains:

32 total addresses

and typically:

30 usable hosts

Example:

192.168.1.0/27

Network:

192.168.1.0

Broadcast:

192.168.1.31

Usable range:

192.168.1.1 – 192.168.1.30

/28 Subnet Calculator

A /28 contains:

16 total addresses

and typically:

14 usable hosts

Example:

192.168.1.0/28

Network:

192.168.1.0

Broadcast:

192.168.1.15

Usable range:

192.168.1.1 – 192.168.1.14

/29 Subnet Calculator

A /29 contains:

8 total addresses

and traditionally provides:

6 usable host addresses

Example:

192.168.1.0/29

Network:

192.168.1.0

Broadcast:

192.168.1.7

Usable range:

192.168.1.1 – 192.168.1.6

/30 Subnet Calculator

A /30 contains:

4 total addresses

and traditionally provides:

2 usable host addresses

Example:

192.168.1.0/30

Network:

192.168.1.0

Usable:

192.168.1.1

192.168.1.2

Broadcast:

192.168.1.3

/30 networks are commonly associated with traditional point-to-point IPv4 links.

/31 Subnet

A /31 contains exactly:

2 addresses

Traditional network/broadcast rules do not apply in the usual way to point-to-point /31 links, which are specifically supported by relevant standards and implementations.

Therefore, a /31 should not simply be calculated as:

2 − 2 = 0 usable hosts

when it is being used for an appropriate point-to-point link.

/32 Host Route

A /32 represents:

one IPv4 address

It is often used to identify a single host or route.

For example:

192.168.1.25/32

represents one IPv4 address rather than a conventional multi-host subnet.

Wildcard Mask

A wildcard mask is often used in network configuration, particularly in some routing and access-control contexts.

It is the inverse of the subnet mask.

For:

255.255.255.0

the wildcard mask is:

0.0.0.255

For:

255.255.255.192

the wildcard mask is:

0.0.0.63

Subnet Mask to CIDR

Common conversions include:

Subnet Mask CIDR
255.0.0.0 /8
255.255.0.0 /16
255.255.255.0 /24
255.255.255.128 /25
255.255.255.192 /26
255.255.255.224 /27
255.255.255.240 /28
255.255.255.248 /29
255.255.255.252 /30
255.255.255.254 /31
255.255.255.255 /32

CIDR to Subnet Mask

The reverse conversion is also possible.

For example:

/24

becomes:

255.255.255.0

/26

becomes:

255.255.255.192

/28

becomes:

255.255.255.240

A subnet calculator performs these conversions automatically.

Subnetting Example

Suppose you have:

192.168.1.0/24

and need to divide it into 4 equal subnets.

Borrowing two host bits creates:

/26

The four subnets are:

  1. 192.168.1.0/26
  2. 192.168.1.64/26
  3. 192.168.1.128/26
  4. 192.168.1.192/26

Each contains:

64 total addresses

and traditionally:

62 usable host addresses

Subnetting a /24 Into 8 Subnets

Starting network:

192.168.1.0/24

To create 8 equal subnets, borrow 3 bits:

24 + 3 = /27

The resulting subnets are:

  • 192.168.1.0/27
  • 192.168.1.32/27
  • 192.168.1.64/27
  • 192.168.1.96/27
  • 192.168.1.128/27
  • 192.168.1.160/27
  • 192.168.1.192/27
  • 192.168.1.224/27

Each has:

32 total addresses

and typically:

30 usable hosts

Private IP Address Ranges

Some IPv4 ranges are reserved for private networks.

The main private ranges defined by RFC 1918 are:

Range CIDR
10.0.0.0 – 10.255.255.255 10.0.0.0/8
172.16.0.0 – 172.31.255.255 172.16.0.0/12
192.168.0.0 – 192.168.255.255 192.168.0.0/16

These addresses are commonly used inside private networks and are not globally routable on the public Internet.

Public vs Private IP Addresses

Private IP

Used inside private networks.

Examples:

192.168.1.10

10.0.0.5

Public IP

Generally globally routable and assigned for Internet communication.

A subnet calculator can calculate the subnet structure of either type of address.

Classful vs Classless Subnetting

Older networking education often discusses:

  • Class A
  • Class B
  • Class C

Modern IP networking primarily uses CIDR, which allows network prefixes of different lengths.

For example:

192.168.1.0/24

is a CIDR network.

The historical class system should not be confused with modern subnetting.

VLSM

Variable Length Subnet Masking (VLSM) allows different subnets within a larger network to use different prefix lengths.

For example, you might use:

  • /26 for a larger department
  • /27 for another department
  • /29 for a small infrastructure segment

This helps use address space more efficiently than giving every subnet the same size.

Supernetting

Supernetting combines multiple contiguous networks into a larger address block.

For example, multiple smaller networks can sometimes be summarized using a shorter prefix.

This is commonly used for route aggregation.

The networks must satisfy the appropriate alignment and contiguity requirements for a valid summary.

Network Address vs Host Address

Consider:

192.168.10.25/24

The network address is:

192.168.10.0

The host portion identifies the individual device within that network.

The IP address itself is therefore composed conceptually of:

Network portion + Host portion

The CIDR prefix determines where that boundary lies.

How to Use the IP Subnet Calculator

Step 1: Enter the IPv4 Address

Example:

192.168.1.25

Step 2: Enter the CIDR Prefix or Subnet Mask

For example:

/24

or:

255.255.255.0

Step 3: Calculate

The calculator determines the subnet information.

Step 4: Review the Results

You can check:

  • Network address
  • Broadcast address
  • Subnet mask
  • CIDR
  • Host range
  • Total addresses
  • Usable hosts
  • Wildcard mask

Common IP Subnet Calculation Mistakes

Confusing IP Address With Network Address

An address such as 192.168.1.25/24 is a host address, while 192.168.1.0/24 identifies the network.

Forgetting the Prefix

The same IP address can belong to different networks depending on the subnet mask.

Assuming Every Subnet Has Two Reserved Addresses

The traditional network/broadcast rule has special cases such as /31 and /32.

Using the Wrong Subnet Mask

A small mask difference can significantly change the network size.

Confusing Private and Public Addresses

An IP’s numerical format alone does not determine whether it is publicly routable.

Frequently Asked Questions

What is an IP Subnet Calculator?

It is a tool that calculates network information from an IPv4 address and subnet mask or CIDR prefix.

What is CIDR?

CIDR stands for Classless Inter-Domain Routing and represents an IP network using a prefix length such as /24.

What does /24 mean?

It means the first 24 bits of the IPv4 address are the network prefix, leaving 8 bits for the remaining address space.

How many addresses are in a /24?

A /24 contains 256 total IPv4 addresses.

Under traditional subnet rules, 254 are normally usable by hosts.

How many hosts are in a /26?

A /26 contains 64 total addresses and traditionally provides 62 usable host addresses.

What is a subnet mask?

A subnet mask identifies the network and host portions of an IPv4 address.

What is a network address?

It identifies the subnet itself, with the host portion set to zero.

What is a broadcast address?

In traditional IPv4 subnets, it is the address used to communicate with all hosts on that subnet.

What is a wildcard mask?

It is the inverse of the subnet mask and is commonly used in certain network configuration contexts.

What is the difference between /24 and /25?

A /24 contains 256 addresses, while a /25 contains 128. A /25 therefore creates a smaller subnet.

Can I calculate private IP subnets?

Yes. The same subnet calculations apply to private IPv4 addresses.

Can I use the calculator for IPv6?

This calculator is designed for IPv4. IPv6 uses 128-bit addresses and has different subnetting conventions.

Is subnetting the same as VLANs?

No. Subnetting is an IP addressing concept, while a VLAN is a Layer 2 network segmentation mechanism. They are often used together.

What is VLSM?

VLSM allows different subnet sizes within a larger address space.

What is a /32?

A /32 represents one IPv4 address.

What is a /31?

A /31 contains two IPv4 addresses and can be used for certain point-to-point links without the traditional network/broadcast host reservation.

Is the IP Subnet Calculator accurate?

Yes, the mathematical subnet calculations are deterministic for valid IPv4 addresses and subnet masks. Special addressing rules should be interpreted according to the networking context.

Is the IP Subnet Calculator free?

Yes. The CalculatorGuides.com IP Subnet Calculator is free to use.

IP Subnet Calculator – Important Things to Remember

When calculating a subnet, check:

  • IPv4 address
  • CIDR prefix
  • Subnet mask
  • Network address
  • Broadcast address
  • Host range
  • Total addresses
  • Usable hosts
  • Private/public addressing
  • Special cases such as /31 and /32

The prefix length is especially important because it determines how many bits belong to the network and how many remain in the address space.

Conclusion

An IP Subnet Calculator makes IPv4 subnetting much easier by automatically calculating the network address, broadcast address, subnet mask, CIDR prefix, host range, and number of addresses.

The basic address-count formula is:

Total Addresses = 2^(32 − Prefix Length)

For traditional IPv4 subnets, the number of usable host addresses is generally:

Total Addresses − 2

although /31 and /32 require special treatment.

Subnet calculators are useful for network administrators, developers, students, IT professionals, and anyone working with IPv4 networks.

Use the CalculatorGuides.com IP Subnet Calculator to quickly check an IPv4 network and understand its available address space.

Leave a Comment

calculatorguides
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.