What is an IP to Decimal Calculator?
An IPv4 address such as 192.168.1.1 is written as four numbers (octets) separated by dots, each ranging from 0 to 255. Internally, however, an IPv4 address is just a single 32-bit unsigned integer. This calculator converts the human-friendly dotted-quad notation into that single decimal integer, which is useful for databases, network programming, ACL rules, and geolocation lookups.
How to use it
Enter each of the four octets (0–255) into the boxes and the calculator instantly returns the equivalent decimal value. If a value exceeds 255 it is clamped to the valid range so the result stays a legitimate IPv4 integer.
The formula explained
For an address a.b.c.d, the decimal value is:
$$\text{decimal} = a \times 16777216 + b \times 65536 + c \times 256 + d$$
The weights are powers of 256: \(256^3 = 16{,}777{,}216\), \(256^2 = 65{,}536\), \(256^1 = 256\), and \(256^0 = 1\). This shifts each octet into its correct 8-bit position within the 32-bit number.
Worked example
Convert 192.168.1.1:
$$192 \times 16777216 = 3{,}221{,}225{,}472$$
$$168 \times 65536 = 11{,}010{,}048$$
$$1 \times 256 = 256$$
$$1 \times 1 = 1$$
$$\text{Total} = 3{,}232{,}235{,}777$$
Common IPv4 Addresses and Ranges in Decimal
The table lists well-known IPv4 blocks with their first and last address in dotted-quad form and as an unsigned 32-bit decimal integer. These are IPv4 standards defined by the IETF and apply worldwide, but how a block is used (for example private ranges) depends on your own network.
| Block | Purpose | First address | Last address | Decimal start | Decimal end | Reference |
|---|---|---|---|---|---|---|
| 0.0.0.0/8 | "This network" / unspecified (0.0.0.0) | 0.0.0.0 | 0.255.255.255 | 0 | 16777215 | RFC 1122, RFC 6890 |
| 10.0.0.0/8 | Private use | 10.0.0.0 | 10.255.255.255 | 167772160 | 184549375 | RFC 1918 |
| 127.0.0.0/8 | Loopback | 127.0.0.0 | 127.255.255.255 | 2130706432 | 2147483647 | RFC 1122, RFC 6890 |
| 169.254.0.0/16 | Link-local | 169.254.0.0 | 169.254.255.255 | 2851995648 | 2852061183 | RFC 3927, RFC 6890 |
| 172.16.0.0/12 | Private use | 172.16.0.0 | 172.31.255.255 | 2886729728 | 2887778303 | RFC 1918 |
| 192.168.0.0/16 | Private use | 192.168.0.0 | 192.168.255.255 | 3232235520 | 3232301055 | RFC 1918 |
| 224.0.0.0/4 | Multicast | 224.0.0.0 | 239.255.255.255 | 3758096384 | 4026531839 | RFC 5771 |
| 255.255.255.255/32 | Limited broadcast | 255.255.255.255 | 255.255.255.255 | 4294967295 | 4294967295 | RFC 919, RFC 6890 |
RFC 6890 consolidates the special-purpose address registry and obsoletes the earlier RFC 5735. The size of a block is \(2^{32-n}\) addresses for a /n prefix, so a /8 holds 16,777,216 addresses and the decimal end equals the decimal start plus 16,777,215.
Key Terms: Octet, Dotted Quad, Unsigned 32-bit Integer
- Octet
- A group of 8 bits (one byte). An IPv4 address has four octets, each with a value from 0 to 255.
- Dotted-quad notation
- The human-readable IPv4 format \(a.b.c.d\) where each octet is written in decimal and separated by dots, e.g. 192.168.1.1.
- Unsigned 32-bit integer
- A whole number from 0 to \(2^{32}-1 = 4294967295\). An IPv4 address is exactly 32 bits, so it maps one-to-one onto this range.
- Big-endian / network byte order
- The convention that the most significant byte is sent first. In an IPv4 address the first octet is the most significant, which is why it is multiplied by 16777216.
- CIDR / subnet
- Classless Inter-Domain Routing writes a block as an address plus prefix length, e.g. 10.0.0.0/8. The first \(n\) bits identify the network and the remaining \(32-n\) bits identify hosts, so the block spans \(2^{32-n}\) consecutive decimal values.
- Decimal vs hexadecimal representation
- The same 32-bit value can be written in different bases. 192.168.1.1 equals 3232235777 in decimal and 0xC0A80101 in hexadecimal, where each octet is two hex digits (C0 = 192, A8 = 168, 01 = 1, 01 = 1).
FAQ
What is the maximum value? 255.255.255.255 equals 4,294,967,295, the largest 32-bit unsigned integer.
What does 0.0.0.0 convert to? Zero — it is the smallest possible value.
Does this work for IPv6? No. IPv6 uses 128-bit addresses; this tool only handles IPv4 dotted-quad addresses.