How to Get the IP Address of Your Computer
Every device connected to a network has an IP address — a numerical label that identifies it on that network. Whether you're troubleshooting a connection, setting up a server, or just curious, finding your IP address is straightforward once you know where to look. The tricky part is understanding which IP address you're actually after, because your computer likely has more than one.
The Difference Between Your Local IP and Your Public IP 🌐
This is the most important thing to understand before you start clicking around.
Your local IP address (also called a private IP) is assigned by your router and identifies your device within your home or office network. It's only visible to devices on the same network and typically looks like 192.168.x.x or 10.0.x.x.
Your public IP address is assigned by your Internet Service Provider (ISP) and identifies your entire network to the outside internet. Every device in your home shares this single public-facing address.
Which one you need depends entirely on what you're trying to do.
| IP Type | Who Assigns It | What It Looks Like | Who Can See It |
|---|---|---|---|
| Local/Private | Your router | 192.168.1.x / 10.0.x.x | Devices on your network |
| Public | Your ISP | Varies, can be IPv4 or IPv6 | Anyone on the internet |
How to Find Your Local IP Address
On Windows
The fastest method is the Command Prompt:
- Press
Windows + R, typecmd, and hit Enter - Type
ipconfigand press Enter - Look for IPv4 Address under your active network adapter (Ethernet or Wi-Fi)
Alternatively, go to Settings → Network & Internet → Wi-Fi or Ethernet → click your connection → scroll to Properties. Your IPv4 address is listed there.
On macOS
Open System Settings (or System Preferences on older macOS versions), navigate to Network, select your active connection, and your IP address appears directly on that screen.
Or use Terminal:
- Type
ifconfig | grep "inet "and look for the address that isn't127.0.0.1(that's your loopback address, not your real local IP)
On Linux
Open a terminal and run:
ip addr show or the older command:
ifconfig Look for inet followed by an address under your active interface — commonly labeled eth0 for wired or wlan0 for wireless.
On iPhone or Android 📱
- iPhone: Settings → Wi-Fi → tap the (i) icon next to your network → IP Address is listed under the IPv4 Address section
- Android: Settings → Wi-Fi → tap your connected network → look under Network Details or Advanced
How to Find Your Public IP Address
This one is simpler. Open any web browser and search for "what is my IP" — Google and most search engines will display it at the top of the results instantly. There are also dedicated sites (like whatismyipaddress.com or similar tools) that show both your IPv4 and IPv6 public addresses.
You can also get it from the command line. On Windows, macOS, or Linux:
curl ifconfig.me This returns your public IP directly in the terminal.
IPv4 vs. IPv6 — Why You Might See Two Addresses
Modern networks often assign both an IPv4 address (the traditional format: four number groups separated by dots, e.g., 192.168.1.15) and an IPv6 address (a longer hexadecimal format, e.g., fe80::1a2b:3c4d:5e6f:7g8h).
IPv6 was introduced to address the exhaustion of IPv4 addresses. Most networks now run both formats simultaneously, a setup called dual-stack. If you see two addresses listed, they're both valid — which one gets used depends on the application and network configuration.
Factors That Affect Which IP Address You See
Not every setup looks the same. A few variables change what you'll find:
- Wired vs. wireless: Your computer may show different IP addresses for its Ethernet adapter and its Wi-Fi adapter — both are valid local IPs for that machine on that interface
- VPN usage: If a VPN is active, your apparent public IP address will reflect the VPN server's location, not your actual ISP-assigned address
- DHCP vs. static assignment: Most home networks use DHCP, which means your router assigns IP addresses automatically and they can change. A static IP is manually configured and stays fixed — relevant for servers, printers, or remote access setups
- Network type: Corporate networks, mobile hotspots, and home routers each handle IP assignment differently, so the address format and range may vary
- Multiple network adapters: Laptops with both Wi-Fi and Ethernet, or systems with virtual network adapters (common if you run virtual machines or Docker), will show multiple IP addresses in
ipconfigorip addroutput
When the Specific IP Address Matters
For most everyday users, knowing your IP is just informational. But the type of IP address becomes genuinely important in specific situations:
- Remote desktop or SSH access to your machine from outside your home requires your public IP
- Connecting devices within the same network (e.g., a NAS drive, local media server, or printer) requires the local IP
- Port forwarding on a router involves both — the router's public IP receives the traffic, then routes it to a local IP
- Diagnosing network issues often starts with confirming whether a local IP was properly assigned by the router
The method you use and the address you need depend less on your computer and more on what the IP address is for. Your OS, your network setup, whether a VPN is running, and whether you're working locally or across the internet all shape which address is the relevant one for your situation.