How Many Bits Are in an IPv4 Address?

Editorial Team ︱ July 8, 2026

Every device that communicates on an IPv4 network relies on an address that identifies where data should go and where it came from. Although IPv4 addresses are often written as familiar dotted numbers such as 192.168.1.1, their real structure is binary. Understanding how many bits are in an IPv4 address helps explain subnetting, routing, address limits, and why newer systems increasingly use IPv6.

TLDR: An IPv4 address contains 32 bits. Those bits are usually divided into four 8-bit sections called octets, written in decimal form with dots between them. Because 32 bits can create about 4.3 billion unique combinations, IPv4 has a limited address space. This limitation is one major reason IPv6 was developed.

How Many Bits Are in an IPv4 Address?

An IPv4 address is exactly 32 bits long. A bit is the smallest unit of digital information and can hold only one of two values: 0 or 1. Since computers process network addresses in binary, every IPv4 address is ultimately stored and interpreted as a sequence of 32 binary digits.

For human readability, the 32 bits are divided into four equal groups of 8 bits. Each 8-bit group is called an octet. These octets are converted into decimal numbers and separated by periods, creating the standard dotted-decimal format. For example, the IPv4 address 192.168.1.1 contains four decimal values, but behind the scenes it represents four binary groups.

IPv4 Address Structure

The basic structure of an IPv4 address can be shown as:

  • Octet 1: 8 bits
  • Octet 2: 8 bits
  • Octet 3: 8 bits
  • Octet 4: 8 bits

When these four octets are added together, the total is:

8 + 8 + 8 + 8 = 32 bits

Each octet can represent a decimal value from 0 to 255. This range exists because 8 bits can create 256 possible combinations, starting at 0 and ending at 255. As a result, a valid IPv4 address may look like 10.0.0.1, 172.16.254.3, or 8.8.8.8.

Example of Decimal and Binary Conversion

Consider the IPv4 address 192.168.1.1. In binary, it becomes:

  • 192 = 11000000
  • 168 = 10101000
  • 1 = 00000001
  • 1 = 00000001

Therefore, the complete 32-bit binary form is:

11000000.10101000.00000001.00000001

The dots are not part of the actual binary value; they are commonly shown to make the address easier to read. Network devices work with the continuous 32-bit value, while people usually work with the dotted-decimal version.

Why IPv4 Uses 32 Bits

IPv4 was designed during an earlier stage of internet development, when the number of connected devices was far smaller. A 32-bit address space appeared large enough at the time because it could theoretically provide 232 unique addresses. This equals 4,294,967,296 possible IPv4 addresses.

However, not every address can be assigned to public devices. Some ranges are reserved for private networks, multicast, loopback testing, documentation, and other special purposes. Because of these reservations, the number of usable public IPv4 addresses is lower than the theoretical maximum.

The rapid growth of personal computers, smartphones, servers, cloud platforms, and internet-connected devices eventually placed heavy pressure on the IPv4 address pool. This shortage led to widespread use of technologies such as Network Address Translation, often called NAT, and encouraged the adoption of IPv6.

IPv4 Bits and Subnetting

The 32 bits of an IPv4 address are also important in subnetting. Subnetting divides a larger network into smaller logical networks. This helps organizations manage traffic, improve security, and use address space more efficiently.

An IPv4 address has two main parts:

  • Network portion: Identifies the network to which the device belongs.
  • Host portion: Identifies the specific device within that network.

A subnet mask determines how many bits belong to the network portion and how many remain for hosts. For example, the notation /24 means the first 24 bits identify the network, while the remaining 8 bits identify hosts. An address such as 192.168.1.0/24 therefore has 256 total address combinations, though some are reserved for the network address and broadcast address.

What Is CIDR Notation?

CIDR, or Classless Inter-Domain Routing, is a compact way to describe how many bits are used for the network portion of an IPv4 address. It appears as a slash followed by a number, such as /8, /16, /24, or /30.

For example, in 10.0.0.0/8, the first 8 bits represent the network. In 192.168.1.0/24, the first 24 bits represent the network. A larger CIDR number usually means a smaller network with fewer host addresses. A smaller CIDR number means a larger network with more possible hosts.

This system gives administrators flexible control over the 32 available bits in an IPv4 address. Instead of being limited to older class-based ranges, networks can be sized more precisely.

IPv4 Compared With IPv6

The 32-bit size of IPv4 is very different from IPv6, which uses 128 bits. This means IPv6 provides an enormously larger address space. While IPv4 has about 4.3 billion theoretical addresses, IPv6 has approximately 340 undecillion possible addresses.

IPv6 was created largely because IPv4 could not support the long-term growth of the internet without workarounds. IPv4 is still widely used, but IPv6 offers more address capacity, simplified address planning, and improved support for modern network needs.

Why the Number of Bits Matters

The fact that an IPv4 address contains 32 bits affects nearly every part of IPv4 networking. It determines how many addresses can exist, how subnets are created, how routing tables are organized, and how private and public address ranges are managed.

For network engineers, system administrators, cybersecurity professionals, and students, the 32-bit structure is a foundation for understanding IP communication. Even simple tasks, such as configuring a home router or assigning a static IP address, rely on the same basic principle: an IPv4 address is a 32-bit value divided into four octets.

Conclusion

An IPv4 address contains 32 bits, arranged as four 8-bit octets. This format allows addresses to be written in an easy-to-read dotted-decimal style while still being processed by computers as binary data. Although 32 bits once seemed sufficient, the explosive growth of the internet revealed its limitations. IPv4 remains essential, but its fixed 32-bit size explains both its usefulness and the need for IPv6.

FAQ

How many bits are in an IPv4 address?

An IPv4 address contains 32 bits.

How many octets are in an IPv4 address?

An IPv4 address contains four octets. Each octet is 8 bits long.

What is the maximum value of an IPv4 octet?

The maximum value of an IPv4 octet is 255, because 8 bits can represent decimal values from 0 through 255.

How many IPv4 addresses are possible?

IPv4 can theoretically provide 4,294,967,296 unique addresses, although many are reserved for special uses.

Why did IPv6 replace IPv4 in many networks?

IPv6 uses 128-bit addresses, which provide vastly more address space than IPv4 and better support for the continued growth of internet-connected devices.