ForHosting KIT · Developer Utilities

IPv4 address class calculator

Type an IPv4 address and get its classful category from the first octet: 192.168.1.10 is class C, with leading bits 110, default mask 255.255.255.0 and the range 192.0.0.0 to 223.255.255.255. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
IP address
192.168.1.10
You get
First octet
192
Class
C
Leading bits
110
Range start
192.0.0.0

Before CIDR and VLSM became the everyday language of networks, every IPv4 address belonged to a fixed classful category—A, B, C, D, or E—read from the leading bits of the first octet. Students still meet that model in certification tracks, interview drills, and textbook chapters that introduce default masks and the classic unicast ranges. Operators and educators need a single, deterministic answer: which class is this address, what was its default mask, and what historical first-octet range did that class cover? This IPv4 address class calculator accepts a dotted-decimal IPv4 address, inspects the first octet, maps it to class A through E with the matching leading-bit pattern, and returns the default classful mask and prefix where they apply, the full historical class range, and a short purpose tag (unicast, multicast, or experimental).

How classful A–E is read from the first octet

Classful IPv4 addressing, as taught from the early classful model and still tested on many exams, does not look at a prefix length you supply. It looks only at the high-order bits of the first octet of a thirty-two-bit address written in dotted decimal.

If the first bit is zero, the address is class A: the first octet falls in zero through one hundred twenty-seven, the historical default mask is two hundred fifty-five point zero point zero point zero (prefix eight), and the full class range is zero point zero point zero point zero through one hundred twenty-seven point two hundred fifty-five point two hundred fifty-five point two hundred fifty-five.

If the first two bits are one then zero, the address is class B: first octet one hundred twenty-eight through one hundred ninety-one, default mask two hundred fifty-five point two hundred fifty-five point zero point zero (prefix sixteen). If the first three bits are one one zero, the address is class C: first octet one hundred ninety-two through two hundred twenty-three, default mask two hundred fifty-five point two hundred fifty-five point two hundred fifty-five point zero (prefix twenty-four).

Classes D and E use the next four-bit patterns: one one one zero marks multicast class D (two hundred twenty-four through two hundred thirty-nine) and one one one one marks experimental class E (two hundred forty through two hundred fifty-five). Loopback one hundred twenty-seven remains class A by the first-octet rule even though hosts treat it specially; private ranges such as ten slash eight and one hundred ninety-two point one hundred sixty-eight slash sixteen still fall in classes A and C under this model.

The calculator does not invent modern CIDR networks or count hosts; it answers the classful textbook question only.

Certification and classroom drills

Give learners an IPv4 string and check class A–E, leading bits, and the historical default mask against exam answer keys.

Docs and legacy network explainers

Annotate runbooks and tutorials with class, default mask, and range labels next to modern CIDR examples without IPAM infrastructure.

How do I find the IPv4 class of an address?

Send the dotted-decimal address in the ip field.

What default masks do classes A, B, and C use?

Class A uses 255.0.0.0 (/8), class B uses 255.255.0.0 (/16), and class C uses 255.255.255.0 (/24).

Is 127.0.0.1 class A?

Yes. Under classful rules the first octet 127 has leading bit 0, so the address is class A even though hosts treat the 127/8 block as loopback.

Does this calculator do CIDR or host counts?

No. It only classifies by historical classful leading bits. For network, broadcast, and host math under a modern prefix, use a subnet calculator.

Why do classes D and E show no default mask?

Because they were never meant for ordinary hosts. Class D, first octet 224 to 239, is multicast, and class E, 240 to 255, is experimental. The calculator still gives their full range and purpose, but marks the mask as not applicable.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev/ipv4-class

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/dev/ipv4-class \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ip":"192.168.1.10"}'
{
  "ip": "192.168.1.10"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev.ipv4_class",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How classful A–E is read from the first octet

Those two classes never had a unicast host default mask in the classful host-subnet sense, so this calculator reports default_mask as n/a and default_prefix as zero while still returning the historical range and a purpose of multicast or experimental.

Input contract, response fields, and validation errors

Example: one nine two point one six eight point one point ten yields class C, leading bits one one zero, default mask two hundred fifty-five point two hundred fifty-five point two hundred fifty-five point zero, prefix twenty-four, and the class C range one nine two point zero point zero point zero through two two three point two five five point two five five point two five five. POST a JSON body with one required string field named ip: a dotted-decimal IPv4 address with exactly four decimal octets separated by dots, each an integer from zero through two hundred fifty-five without leading zeros (for example one nine two point one six eight point one point ten). Aliases address and ipv4 are accepted with the same meaning. IPv6 literals, CIDR suffixes such as slash twenty-four, non-numeric tokens, wrong octet counts, and out-of-range octets fail with invalid_input and are not billed. On success the body echoes the normalized dotted address as ip, the integer first_octet used for classification, the single-letter class (A, B, C, D, or E), leading_bits as a bit string such as zero, one zero, one one zero, one one one zero, or one one one one, range_start and range_end for the full historical class span, default_mask as a dotted mask for A B C or the string n/a for D and E, default_prefix as eight sixteen or twenty-four for unicast classes and zero when no classful host mask applies, and purpose as unicast, multicast, or experimental. Pair this with a separate subnet calculator when you need host counts or network and broadcast addresses under a modern prefix; this endpoint never performs VLSM math.

Where an IPv4 class calculator earns its keep

Networking courses and certification prep still ask students to name the class of an address and state the default mask before teaching CIDR. Auto-graders and LMS plugins need a deterministic oracle that treats two two four point zero point zero point one as class D multicast and rejects malformed strings instead of silently guessing. Failed validation does not consume balance. Operations runbooks that explain legacy classful defaults next to modern prefixes can call this API once per example address and cache the class and range labels without standing up a full IPAM stack. Keep the request to a single dotted IPv4 string, pin the returned class and mask in tests, and you get reproducible classful answers for homework, content widgets, and edge workers without depending on routing tables or geolocation services.

LMS and auto-grading oracles

Mark classful-addressing items with a deterministic API that rejects bad octets and never confuses multicast class D with unicast C.

What does the IPv4 address class calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →