What “bug” means: the short answer
“Bug” has two main meanings, and which one you mean depends on context:
- An animal. In biology, a bug (or “true bug”) is an insect in the order Hemiptera, a large group that includes stink bugs, bed bugs, cicadas and aphids. In everyday speech, people also use “bug” loosely for almost any small crawling or flying creature, including beetles, ants, spiders and even pill bugs.
- A flaw in technology. In software and engineering, a bug is a mistake in code or design that makes a program behave in a way nobody intended.
Each meaning has its own “types.” In nature, true bugs are split into a few major groups. In software, bugs are grouped by what goes wrong, such as logic errors, performance problems or security holes. This guide covers both, starting with the animals.
Bugs in the animal world
True bugs: the scientific meaning
To an entomologist, “bug” has a fairly narrow meaning. True bugs belong to the order Hemiptera, which is one of the largest insect orders. Published estimates of described species vary, but they generally fall somewhere between about 80,000 and more than 100,000, and new species are still being named.
What ties them together is not color, size or habitat but the mouth. True bugs have piercing-sucking mouthparts: a slender beak (called a rostrum) that holds needle-like stylets. They use it to pierce plants or prey and suck up fluids such as sap or body juices. They cannot chew the way beetles or grasshoppers do. If you’re curious about how this compares with other feeding styles, the question of what insects have piercing-sucking mouthparts goes well beyond true bugs, since mosquitoes, fleas and some others pierce too, using differently built mouthparts.
A few other traits are common across the group:
- Incomplete metamorphosis. Young true bugs, called nymphs, usually look like small, wingless versions of the adults. They molt several times and never pass through a pupal stage.
- Wings. Many true bugs have wings, though some species or life stages are wingless. In the largest subgroup, the front wings are often thickened near the base and membranous at the tip.
- The basic insect body plan. Like all insects, they have the three key anatomical features that define an insect: a head, thorax and abdomen, with six legs on the thorax.
We go deeper into these traits in our answer to what defines a bug animal.
The three main groups of true bugs
Classification within Hemiptera is still being revised, but most references divide the order into three or four suborders. The three you’ll hear about most are:
| Group | Typical members | What they’re like |
|---|---|---|
| Heteroptera | Stink bugs, shield bugs, assassin bugs, bed bugs, water striders, backswimmers, squash bugs | The group many entomologists mean by “true bugs.” Many have the half-thickened front wings. Some feed on plants, some hunt other insects, and a few feed on blood. |
| Auchenorrhyncha | Cicadas, leafhoppers, planthoppers, froghoppers (spittlebugs), treehoppers | Plant-sap feeders, many of them good jumpers. Cicadas are famous for their loud calls. |
| Sternorrhyncha | Aphids, scale insects, mealybugs, whiteflies, psyllids | Usually small and often slow-moving or stationary. Many are well-known garden and crop pests. |
So when someone asks what the types of bugs are in a scientific sense, these groups are the most useful answer. A stink bug, a cicada and an aphid look quite different, but all three share the same sucking beak.
“Bug” as an everyday word for small creatures
Outside of science, “bug” is a catch-all. Most people use it for any small creature with lots of legs, and that’s perfectly normal English. In this loose sense, “bugs” can include:
- Other insects, such as beetles, ants, flies, moths, crickets and cockroaches
- Arachnids, such as spiders, ticks, mites and scorpions, which have eight legs and are not insects at all
- Myriapods, such as centipedes and millipedes
- Crustaceans, such as pill bugs and sow bugs (woodlice), which are related to crabs and shrimp
All of these are arthropods: animals with jointed legs and a hard outer skeleton. That shared body plan is likely part of why people lump them together. If you want to know where each group sits, the taxonomic classification of insects and their relatives is a good place to start, and our explainer on what is the difference between an insect and a bug covers the distinction directly.
Popular “bugs” that are not true bugs
Plenty of creatures carry “bug” in their common name without being true bugs:
- Ladybugs (lady beetles) are beetles.
- June bugs are beetles.
- Lightning bugs (fireflies) are beetles.
- Pill bugs and sow bugs are crustaceans.
- Doodlebugs is a common name for antlion larvae, which belong to a different insect order.
Some entomologists follow a writing convention to keep this straight: when the name refers to a true bug, “bug” is written as a separate word (bed bug, stink bug, assassin bug), and when it doesn’t, the words are run together (ladybug, doodlebug). Many familiar names break the pattern, June bug among them, so treat it as a hint rather than a rule.
Bugs in software and technology
Common types of software bugs
In computing, a bug is an error, flaw or fault in a program or system that produces an incorrect or unexpected result. Bugs are usually grouped by what goes wrong. Common categories include:
- Functional bugs: a feature doesn’t do what it’s supposed to, such as a button that does nothing.
- Logic bugs: the code runs but follows the wrong reasoning, giving wrong answers.
- Syntax errors: code that breaks the rules of the programming language, often caught before the program even runs.
- Calculation bugs: wrong math, rounding problems or incorrect formulas.
- Performance bugs: the program is slow, freezes or uses too much memory.
- Security bugs: flaws that could let someone access data or systems they shouldn’t.
- Compatibility bugs: software works on one device, browser or operating system but not another.
- Usability and interface bugs: layout problems, confusing controls or text that doesn’t fit.
- Concurrency bugs: problems that appear when several processes run at once, such as race conditions.
We break these down further, with examples, in our article on what are the different types of software bugs.
Bugs ranked by severity
Testing teams also sort bugs by how much harm they cause. Labels vary by company, but a common scale is:
- Critical: the system crashes, data is lost or a core feature is completely blocked.
- High (major): an important feature is broken, but there may be a workaround.
- Medium: something is wrong but doesn’t stop people from using the product.
- Low (minor): cosmetic problems such as typos or misaligned text.
Teams pair severity with priority, which describes how soon a fix is needed. A typo on a company’s home page is low severity but may be high priority. If you’re the one reporting the problem, our guide on how to write a bug report in software testing explains what details to include.
Where the computer meaning came from
A popular story says the term began in 1947, when engineers working on the Harvard Mark II computer found a moth stuck in a relay and taped it into their logbook with the note “first actual case of bug being found.” That logbook is now held by the Smithsonian’s National Museum of American History.
The joke in the note only works because “bug” already meant a technical fault. Engineers had used the word for defects in machinery for decades, and Thomas Edison referred to “bugs” in his inventions in the late 1800s. The moth incident helped popularize the term in computing, but it didn’t invent it.
People often use “glitch” in a similar way. The two words overlap, but they aren’t quite the same; our article on what is a bug vs glitch explains the difference.
Other everyday meanings of “bug”
“Bug” turns up in several other common phrases:
- An illness, usually a mild, contagious one, as in “a stomach bug” or “there’s a bug going around.”
- A hidden listening device, as in “the room was bugged.”
- A strong enthusiasm, as in “she caught the travel bug.”
- To annoy someone, as in “stop bugging me.”
These meanings are informal, but they’re all widely understood.
How to tell which meaning is intended
Context almost always settles it:
- If the conversation is about gardens, homes, nature or pests, “bug” probably means a small creature. Whether it’s a true bug depends on how precise the speaker is being.
- If it’s about apps, websites, games or devices, “bug” means a defect.
- If someone is talking about feeling unwell, it usually means a minor illness.
When precision matters, such as identifying a pest or filing a report with a software team, it helps to use more specific words: “stink bug” or “beetle,” “crash” or “login error.”
Quick summary
- In biology, a true bug is an insect in the order Hemiptera, defined mainly by its piercing-sucking beak. Its main groups include stink bugs and their relatives, cicadas and leafhoppers, and aphids and scale insects.
- In everyday speech, “bug” can mean almost any small arthropod, including beetles, spiders and pill bugs.
- In technology, a bug is a flaw in software or hardware. Bugs are typed by what goes wrong (functional, logic, performance, security and so on) and ranked by severity.
- The computing sense predates the famous 1947 moth, though that story helped make the term popular.