Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Decimal (32-bit Integer)
3,232,235,777
for IP 192.168.1.1
Calculation 192×16777216 + 168×65536 + 1×256 + 1

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.

Advertisement
Diagram of four IP octets multiplied by place values and summed into one decimal integer
Each octet is multiplied by its place value and the four products are added to form the decimal value.

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$$

32-bit binary grouped into four octets converting to a single decimal number
An IPv4 address is 32 bits, four 8-bit octets that combine into one decimal value.

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.

Last updated: