Skip to content

IPv4 Subnet Calculator

Find the network for an IPv4 address and a prefix. 192.168.1.10 with prefix 24 has network 192.168.1.0, mask 255.255.255.0, and 254 hosts. The page does not scan a network.

Result

Enter an address and a prefix

How to Use

  1. 1 Enter an IPv4 address and a prefix from 0 to 32.
  2. 2 Read the network, mask, and host count.
  3. 3 192.168.1.10 / 24 is network 192.168.1.0.

Example Output

  • 192.168.1.10 / 24 is network 192.168.1.0.

About This Tool

Prefixes 0 through 30 reserve the network and broadcast addresses. Prefix 31 has 2 addresses. Prefix 32 has 1 address.

Using the IPv4 Subnet Calculator

This page finds the network that contains an IPv4 address at a prefix you enter. The sample address is 192.168.1.10 and the sample prefix is 24. The network is 192.168.1.0. The mask is 255.255.255.0. The broadcast is 192.168.1.255. The first host is 192.168.1.1. The last host is 192.168.1.254. The host count is 254. The page does not scan a network. It does not send a packet, and it does not tell you which of those addresses answers.

The headline is the network, 192.168.1.0 for the sample. The lines under it list the network, the mask, the broadcast, the first host, the last host, and the hosts. The result sentence reads 192.168.1.10 / 24 has network 192.168.1.0, mask 255.255.255.0, and 254 hosts. Copy that sentence when you want the address, the prefix, the network, the mask, and the host count together. The separate lines are where you read the broadcast and the host ends.

Read the six lines in order each time you calculate, because the sentence does not repeat every line. The sentence carries the address, the prefix, the network, the mask, and the host count. The broadcast, the first host, and the last host are on their own lines. For the sample those three are 192.168.1.255, 192.168.1.1, and 192.168.1.254. A note that copies only the sentence has lost the broadcast and the host ends. A note that copies only the headline has the network 192.168.1.0 and has lost the mask. The page does not scan a network, so none of the six lines is a reply from a machine. They are the block described by 192.168.1.10 at prefix 24. Prefix 31 and prefix 32 change how many of those addresses count as hosts, which is why the sample's 254 should be re-read if you change the prefix and forget to replace the note.

Prefixes 0 through 30 reserve the network address and the broadcast address, so the host count is the size of the block minus 2. Prefix 24 is in that group. The block has 256 addresses, and 254 of them are hosts. Prefix 31 has 2 addresses. Prefix 32 has 1. The prefix field accepts a whole number from 0 to 32. An address that is not IPv4 is rejected with the message to enter an IPv4 address.

What Prefix 24 Returns

192.168.1.10 with prefix 24 sits in the network 192.168.1.0. The mask 255.255.255.0 is the prefix written as four octets. The broadcast 192.168.1.255 is the last address of that block. The first host 192.168.1.1 is the address after the network. The last host 192.168.1.254 is the address before the broadcast. The host count 254 is every address in the block except those two reserved ends. The headline shows 192.168.1.0. The page does not scan a network, so 254 is a count of addresses in the arithmetic, not a count of machines that replied.

The same address with a different prefix is a different block. Prefix 32 has 1 address. For 192.168.1.10 at prefix 32, the network, the broadcast, the first host, and the last host are all 192.168.1.10, the mask is 255.255.255.255, and the host line is 1. Prefix 31 has 2 addresses, and those two are both counted as hosts because the network and the broadcast are not reserved at 31 or 32. Prefix 24 keeps the reservation, which is why the sample says 254 hosts rather than 256.

How the Mask Is Applied

Enter 192.168.1.10 and the prefix 24, then calculate. The page checks that the address is IPv4 and that the prefix is a whole number from 0 to 32. It applies the prefix as a mask. For 24, the mask is 255.255.255.0, and the address with that mask is the network 192.168.1.0. The broadcast is the network with the remaining bits set, 192.168.1.255. Because 24 is below 31, the first host is one past the network and the last host is one before the broadcast. The host count is 254. The page does not scan a network to produce those six readings.

A URL split is a different breakdown of a string. The URL Parser splits an http or https URL into its parts. https://www.nimbtools.com/path?a=1#top has the host www.nimbtools.com. That page does not open the URL, and it does not turn 192.168.1.10 with prefix 24 into network 192.168.1.0 or mask 255.255.255.0. Use it when you want the parts of an address that starts with http or https. Use this page when you want the subnet readings for an IPv4 address and a prefix.

What the Page Does Not Scan

The page does not scan a network. 192.168.1.1 and 192.168.1.254 are the first and last host addresses in the arithmetic for prefix 24. The page does not contact them. It does not report which ones are in use, and it does not walk from 192.168.1.1 toward 192.168.1.254. The broadcast 192.168.1.255 is named because the mask says it is the top of the block. It is not a packet the page sent.

The calculation also does not assign the address 192.168.1.10 to a machine, and it does not change a prefix on a router. You enter an address and a prefix. You read a network, a mask, a broadcast, a first host, a last host, and a host count. For the sample those values are 192.168.1.0, 255.255.255.0, 192.168.1.255, 192.168.1.1, 192.168.1.254, and 254. If a value you expected is different, the prefix you typed is the first thing to read again. The page does not scan a network to reconcile the difference.

The Sample and the Short Prefixes

Enter 192.168.1.10 and prefix 24. Confirm the network 192.168.1.0, the mask 255.255.255.0, the broadcast 192.168.1.255, the first host 192.168.1.1, the last host 192.168.1.254, and 254 hosts. Confirm the headline is 192.168.1.0. Enter prefix 32 with the same address. Confirm one host and the mask 255.255.255.255. Enter prefix 31 and confirm the host count is 2. Enter an address that is not four decimal octets and confirm the message that asks for an IPv4 address. Enter a prefix of 33 and confirm the prefix is rejected. The page does not scan a network on the accepted rows or on the rejected ones.

A count of seconds is a different number. The Unix Time to Date tool turns Unix seconds into a UTC date and time. 1600000000 is 2020-09-13 12:26:40 UTC. The range is 0 through 4102444800. That page uses UTC, not the browser time zone. It does not apply a prefix to 192.168.1.10, and it does not return the mask 255.255.255.0. Use it when you have Unix seconds. Use this page when you have an IPv4 address and a prefix.

Prefixes and Host Counts

The prefix runs from 0 through 32. Prefixes 0 through 30 reserve the network and the broadcast, so the host count is two less than the number of addresses in the block. Prefix 24 holds 256 addresses and 254 hosts, which is the sample. Prefix 31 has 2 addresses, and both are counted as hosts. Prefix 32 has 1 address, and that address is the network, the broadcast, the first host, and the last host. The page does not offer a prefix above 32 or below 0. A prefix that is not a whole number is rejected.

The address must be IPv4. Four octets, each from 0 through 255, are what the field accepts. The page does not scan a network, so it also does not accept a range written as two addresses, a list of hosts, or a name in place of the octets. 192.168.1.10 is one address. The prefix is a separate field. Together they select one block, and the six lines describe that block.

Mistakes That Change the Host Count

The usual miss is to subtract nothing and call the host count 256 for prefix 24. The network and the broadcast are reserved for prefixes 0 through 30, so the sample has 254 hosts. Another miss is to apply that subtraction at prefix 31 or 32. Prefix 31 has 2 addresses. Prefix 32 has 1. Another miss is to read the headline as the address you typed. The headline is the network, 192.168.1.0, not 192.168.1.10. Another miss is to treat 254 as a scan. The page does not scan a network. Another miss is to paste a prefix with a slash into the prefix field. The prefix field is the number 24, and the address field is 192.168.1.10.

Bits are a different conversion. The Decimal to Binary Converter converts a whole number to binary. 10 is 1010. 0 is 0. That page does not use a fraction, and it does not return network 192.168.1.0 or 254 hosts for prefix 24. Use it when you want the binary form of one whole number. Use this page when you want the subnet for an IPv4 address and a prefix.

Keeping the Six Lines

Copy the six lines with the address and the prefix that produced them. For the sample, write 192.168.1.10 / 24 beside network 192.168.1.0, mask 255.255.255.0, broadcast 192.168.1.255, first host 192.168.1.1, last host 192.168.1.254, and 254 hosts. The headline is the network, so a note that keeps only the headline has the block identity and has lost the mask and the host ends unless you copy the lines too. The page does not scan a network, so the note should not say that 254 machines answered. Add one sentence to the note that states the reservation rule you used. For prefix 24, say that prefixes 0 through 30 reserve the network and the broadcast, which is why 256 addresses become 254 hosts. If the note is for prefix 31, say that prefix 31 has 2 addresses. If the note is for prefix 32, say that prefix 32 has 1. Mixing those sentences across prefixes is how a later reader turns the sample into a different block. Keep the address 192.168.1.10 in the note as well, because the network 192.168.1.0 is shared by every address in that prefix 24 block, and the address you typed is what selected it.

Calculate the sample twice. The six lines should match. If you change only the prefix, replace the whole note. Prefix 32 on the same address is a one-address block, and mixing its mask 255.255.255.255 into the prefix 24 note would describe a block the page did not return. Reset restores 192.168.1.10 and 24 if you want the sample fields back. The last result stays on screen until you calculate again.

Calculating the Sample Again

Enter 192.168.1.10 and prefix 24. Confirm network 192.168.1.0, mask 255.255.255.0, broadcast 192.168.1.255, first host 192.168.1.1, last host 192.168.1.254, and 254 hosts. Run it again and confirm the same lines. Switch the prefix to 31 and confirm 2 hosts. Switch the prefix to 32 and confirm 1 host. Clear the address and confirm the page asks for an IPv4 address. The page does not scan a network between these runs. The headline for the sample remains 192.168.1.0 each time the prefix is 24.

Binary digits of a single value are a different reading. The Binary to Decimal Converter converts a binary number to decimal. 1010 is 10. Each digit doubles the place of the digit on its right. That page does not convert other bases, and it does not apply prefix 24 to 192.168.1.10. Use it when you have binary digits. Use this page when you have an IPv4 address and a prefix and want the network, the mask, and the host count.

What the Host Count Means

The host count means how many addresses the prefix treats as hosts. For 192.168.1.10 with prefix 24, that number is 254, because the block has 256 addresses and the network 192.168.1.0 and the broadcast 192.168.1.255 are reserved. The first host 192.168.1.1 and the last host 192.168.1.254 are the ends of that host range. Prefix 31 has 2 addresses, both counted. Prefix 32 has 1. The mask is the prefix in dotted form. For the sample it is 255.255.255.0. The page does not scan a network, so the count is not a discovery result.

You can say the sample network is 192.168.1.0, the mask is 255.255.255.0, the broadcast is 192.168.1.255, the first host is 192.168.1.1, the last host is 192.168.1.254, and there are 254 hosts. You can say prefix 31 has 2 addresses and prefix 32 has 1. You cannot say the page contacted 192.168.1.1. You cannot say 256 hosts for prefix 24. The reservation of the two ends is the reason the sample says 254. Repeat the six lines in that order when you explain the sample, and name the prefix beside them. The headline alone, 192.168.1.0, is the network and not the whole answer. The mask tells you the prefix in dotted form. The host lines tell you the usable ends for prefixes that reserve the network and the broadcast. The page does not scan a network to fill any of those lines, so an explanation that adds "and these hosts responded" has left the tool. Stay with the arithmetic the lines already show.

Checking the Sample Block

Start with 192.168.1.10 and prefix 24. Confirm all six lines: network 192.168.1.0, mask 255.255.255.0, broadcast 192.168.1.255, first host 192.168.1.1, last host 192.168.1.254, and 254 hosts. Then set prefix 31 and confirm 2 hosts. Then set prefix 32 and confirm 1 host. Then reject a prefix outside 0 to 32 and an address that is not IPv4. The page does not scan a network, so none of these checks should wait on a reply from 192.168.1.10. If the sample host count is 256, the reserved ends were not removed.

Other bases are a different conversion of one integer. The Number Base Converter converts a whole number from one base to another. Bases run from 2 to 36. Digits above 9 use the letters A through Z. 255 in base 10 is FF in base 16. 1010 in base 2 is 10 in base 10. That page does not compute a subnet mask. Use it when you are changing base. Use this page when you want the prefix 24 block for 192.168.1.10.

Frequently Asked Questions

What is 192.168.1.10 with prefix 24?

Network 192.168.1.0, mask 255.255.255.0, broadcast 192.168.1.255, first host 192.168.1.1, last host 192.168.1.254, and 254 hosts. The page does not scan a network.

Why is the host count 254?

Prefix 24 has 256 addresses. Prefixes 0 through 30 reserve the network and the broadcast, so two addresses are not counted as hosts.

What does prefix 31 return?

Prefix 31 has 2 addresses. Both are counted as hosts. The network and the broadcast are not reserved at 31.

What does prefix 32 return?

Prefix 32 has 1 address. For 192.168.1.10 the network, broadcast, first host, and last host are that same address.

What is the headline?

The network. For the sample the headline is 192.168.1.0. The mask and the host lines sit under it.

Does the page scan a network?

No. It applies the prefix to the address and lists the block. It does not contact 192.168.1.1 or any other host.

Which prefixes are allowed?

A whole number from 0 to 32. An address that is not IPv4 is rejected before the prefix is applied.

Will a second run of the sample differ?

No. 192.168.1.10 with prefix 24 returns the same network, mask, broadcast, host ends, and 254 hosts.

Which lines are missing from the result sentence?

The sentence includes the network, the mask, and 254 hosts. The broadcast 192.168.1.255, the first host 192.168.1.1, and the last host 192.168.1.254 are on their own lines. The page does not scan a network to produce them.