Subnet Calculator — IP, Mask, Hosts & Network Ranges

optimisation du moteur de recherche
  1. Home
  2. Developer Tools
  3. Subnet Calculator
Share: Report

Subnet Calculator

100% free · Runs 100% in your browser · No signup needed

IP address
Prefix length (CIDR)
/24
Slide to choose the subnet size, or pick a preset mask below.
IP address
Network address
Broadcast address
First usable host
Last usable host
Usable hosts
Subnet mask
Wildcard mask
IP class
Type
Mask in binary
IP in binary

Sur Subnet Calculator

What is the Subnet Calculator?

Every device on a network has an IP address, but a raw IP address alone does not tell you where one network ends and another begins. Subnetting is the technique of splitting a larger network into smaller, manageable sub-networks — and the Subnet Calculator by FistHost does all the binary arithmetic for you. Enter any IPv4 address and a CIDR prefix length (like /24), and it instantly reveals the network address, broadcast address, first and last usable hosts, total usable host count, subnet mask, wildcard mask, the IP's class, and whether the address is private or public — plus the mask and IP in binary notation.

Why does subnetting matter? On a real network, you cannot just hand out IP addresses at random. The subnet mask tells every device which part of an address identifies the network and which part identifies the host. Get it wrong and devices cannot talk to each other, or you waste hundreds of addresses you will never use. Network engineers subnet to carve a big address block into right-sized pieces: a /24 for the office LAN (254 usable hosts), a /30 for a point-to-point router link (2 usable hosts), a /16 for an entire campus. The calculator removes the error-prone manual binary work — no more counting bits on paper — and shows every derived value on one clean screen.

CIDR notation (the /24-style number) is simply a compact way of writing the subnet mask: it counts how many leading bits of the 32-bit address are ones. A /24 means 24 network bits and 8 host bits, giving 2^8 = 256 total addresses, of which 254 are usable (the network and broadcast addresses are reserved). The calculator handles the tricky edge cases too: /31 subnets use both addresses as usable hosts per RFC 3021 (used for point-to-point links), and a /32 represents a single host with no usable host range at all — both are displayed with clear explanations instead of confusing zeros.

How to Use the Subnet Calculator

  1. Enter the IP address — type any valid IPv4 address, e.g. 192.168.1.10. The tool validates that all four octets are numbers from 0 to 255 and shows a friendly error if not.
  2. Choose the prefix length — drag the slider from /1 to /32, or click a preset button (/24, /16, /8, /30, /32) for common subnet sizes.
  3. Click Calculate Subnet — every result appears instantly in a single table.
  4. Read the network address — the first address of the subnet, which identifies the network itself.
  5. Read the broadcast address — the last address, used to send traffic to every host on the subnet at once.
  6. Check the usable host range — the first and last addresses you can actually assign to devices, plus the total usable host count.
  7. Copy the mask and wildcard — the subnet mask for device configuration and the wildcard mask for access-control lists and routing rules, with binary notation shown for study or verification.

Key Features

  • Interactive CIDR slider (1–32) — drag through every possible prefix length and watch the subnet maths change, or jump with one-click presets.
  • Friendly IP validation — rejects malformed input (wrong octet count, letters, numbers above 255) with a plain-language error message, not a cryptic failure.
  • Complete result table — network address, broadcast address, first/last usable host, usable host count, subnet mask, wildcard mask, IP class, and private/public type in one view.
  • RFC 3021 /31 handling — /31 subnets correctly show 2 usable hosts for point-to-point links instead of the misleading zero a naive 2^n−2 formula gives.
  • /32 single-host support — correctly identifies a /32 as one host with no host range, exactly as routers treat it.
  • Binary notation display — shows both the subnet mask and the IP address in full 32-bit binary, perfect for students verifying their hand calculations.
  • IP class detection — identifies Class A through E, loopback, and special addresses from the first octet.
  • Private vs public labelling — flags RFC 1918 private ranges and loopback addresses so you know instantly whether an address is internet-routable.
  • Wildcard mask included — the inverse of the subnet mask, ready to paste into Cisco-style access lists and OSPF/EIGRP network statements.

Pro Tips

  • Use /30 (or /31) for point-to-point links. A router-to-router serial link only needs 2 addresses. A /30 gives 2 usable hosts; modern gear supports /31 (RFC 3021) which uses both addresses with zero waste.
  • Remember the two reserved addresses. In any subnet larger than /31, the network address and broadcast address cannot be assigned to hosts — usable hosts always equal 2^n − 2. The calculator already accounts for this.
  • Size subnets with the power-of-two formula. Need 50 hosts? 2^5 = 32 is too small, 2^6 = 64 fits, so you need 6 host bits → a /26. The slider makes this trial-and-error instant.
  • Plan the subnet before assigning addresses. Decide your subnet boundaries first, then assign. Random assignment inside an overlapping range is the number-one cause of mysterious connectivity bugs.
  • /24 is the everyday workhorse. Home routers and small offices almost always use 192.168.x.0/24 — 254 usable addresses, simple to remember, and enough for nearly any small network.
  • Keep learning toward IPv6. IPv4 subnetting skills transfer conceptually, but IPv6 uses 128-bit addresses and /64-per-subnet conventions — a whole new (and simpler) playground.

Designing a network for a new office or project? You will need a website to go with it. FistHost offers web hosting from just $0.99/month with a free domain included — fast, reliable, and simple enough for anyone to launch a site in minutes. Get your network — and your web presence — running with FistHost.

Who Uses the Subnet Calculator?

  • Network engineers — professionals designing and troubleshooting enterprise LANs, WANs, and data-centre addressing plans.
  • System administrators — IT staff configuring routers, switches, firewalls, and DHCP scopes with correct masks and ranges.
  • IT students and certification candidates — learners studying for CCNA, CompTIA Network+, or university networking exams who need to check their binary maths.
  • Security analysts — specialists writing firewall rules and ACLs who need exact network/broadcast boundaries and wildcard masks.
  • Developers and DevOps engineers — anyone carving VPC subnets in AWS, Azure, or GCP and validating CIDR blocks before applying them.
  • Helpdesk and support technicians — frontline staff quickly checking whether a device's IP and mask place it on the right subnet.

Frequently Asked Questions

What does the /24 in an IP address mean?

It is CIDR notation: the number of leading bits in the 32-bit address that belong to the network portion. A /24 means 24 network bits and 8 host bits, equivalent to the subnet mask 255.255.255.0, giving 256 total addresses and 254 usable hosts.

How many usable hosts are in a /24 subnet?

254. A /24 has 8 host bits, so 2^8 = 256 total addresses, minus the network address and the broadcast address which are reserved. The calculator shows this instantly for any prefix.

What is a /31 subnet used for?

Point-to-point links between two routers. Per RFC 3021, both addresses in a /31 are usable as host addresses — there is no network or broadcast address. It eliminates the waste of a /30 on links that only ever connect two devices.

What is a wildcard mask?

The bitwise inverse of the subnet mask: where the subnet mask has 1s, the wildcard has 0s and vice versa. For 255.255.255.0 the wildcard is 0.0.0.255. It is used in access-control lists and some routing-protocol configurations to match ranges of addresses.

What is the difference between classful addressing and CIDR?

Classful addressing assigned fixed boundaries (Class A = /8, B = /16, C = /24) which wasted enormous numbers of addresses. CIDR (Classless Inter-Domain Routing) allows any prefix length, so networks can be sized precisely. The calculator works in CIDR but still reports the legacy class for reference.

Why can't I use the network or broadcast address for a host?

By convention, the first address identifies the network itself and the last is reserved for broadcast traffic to all hosts. Assigning either to a device causes conflicts and dropped traffic. The calculator's usable-host range always excludes them (except /31 and /32).

How do I know if an IP is private or public?

Private ranges defined by RFC 1918 are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — these are never routed on the public internet and are reused inside organisations. The calculator labels private and loopback addresses automatically.

Related Tools

Pair this with other free network tools: My IP Address to see your current public IP, Domain Into IP to resolve a domain before subnetting it, and Base64 Encoder Decoder for working with binary-style encoded data.

Building a tech blog, a portfolio, or a company site to go with your networking skills? FistHost web hosting starts at only $0.99/month with a free domain included — one-click setups, solid uptime, and pricing that makes sense. Launch your site on FistHost today.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


FistHost

Blazing-Fast Web Hosting

Plans from $0.99/mo
Free domain included

Get Hosting
FistHost Web Hosting Blazing-fast hosting for your website Plans from $0.99/mo · Free domain included Get Hosting