IP Address to Decimal Converter
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the four numbers of an IPv4 address to get the single 32-bit integer it stands for.
Result
Decimal (32-bit integer)
Historical address class
- Private range
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- First octet (0-255): enter a number from 0 to 255.
- Second octet (0-255): enter a number from 0 to 255.
- Third octet (0-255): enter a number from 0 to 255.
- Fourth octet (0-255): enter a number from 0 to 255.
- Read the result: Decimal (32-bit integer); the panel also shows Historical address class and Private range.
How this calculator works
An IPv4 address is one 32-bit number written as four 8-bit octets. Decimal value = a × 256³ + b × 256² + c × 256 + d = a × 16,777,216 + b × 65,536 + c × 256 + d.
The class comes from the first octet under the original classful scheme (RFC 791): 0-127 A, 128-191 B, 192-223 C, 224-239 D (multicast), 240-255 E. Routing has used CIDR prefixes instead since 1993, so the class is only a label today.
Private ranges are those reserved by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
The formula
| Symbol | Meaning |
|---|---|
| First octet (0-255) | |
| Second octet (0-255) | |
| Third octet (0-255) | |
| Fourth octet (0-255) | |
| Decimal (32-bit integer) |
Worked example
| First octet (0-255) | 192 |
|---|---|
| Second octet (0-255) | 168 |
| Third octet (0-255) | 1 |
| Fourth octet (0-255) | 1 |
| Historical address class | Class C |
|---|---|
| Private range | Private (RFC 1918) |
Decimal (32-bit integer) 3232235777
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is 192.168.1.1 as a decimal number?
3232235777.
What is 8.8.8.8 in decimal?
134744072. It is a Class A, public address.