Botanists will tell you a tomato is a fruit, and many people already know that. But what many people don't know is that in the United States, tomatoes are legally vegetables. In 1893, the Supreme Court ruled that a tomato should be classified as a vegetable "based on the ways in which it is used, and the popular perception to this end." If you're wondering why the Supreme Court was ruling on something like this, it had to do with taxes. Vegetables at the time were taxed, but fruits were not.

There are other fruits that we consider vegetables, based on popular perception and the ways they're used. Here are several more that may surprise you.

Olives

closeup-olvies-on-branch Olives are a fruit because they come from the flower of the olive tree. (Photo: Tomo Jesenicnik/Shutterstock)

If you had asked me, I might have said olives were a vegetable, not a fruit. But olives are a fruit because they come from the flower of the olive tree. A fruit comes from the mature ovary of a plant and the ovary is found in the flower. That's why all of these vegetables are technically fruit — they grow from a flower.

Eggplant

eggplants on wooden table Eggplants are technically berries — really, really big ones. (Photo: Valentsova/Shutterstock)

We certainly treat eggplants like vegetables. I've never seen them eaten raw. They are savory — or sometimes a little bitter — not sweet. But not only are eggplants botanically fruits, they are considered berries. Very, very large berries. I don't see myself throwing one into a smoothie anytime soon, though.

Pumpkins and squash

pumpkins in a home garden Pumpkins, squash and zucchini start out from the flowers of their vines. (Photo: MNStudio/Shutterstock)

Pumpkins and other types of squash, including zucchini, start out from a flower on a vine, and so they're technically fruits.

Cucumbers

Cucumber Cucumbers, like their squash cousins, are technically a fruit. (Photo: LedyX/Shutterstock)

Cucumbers are closely related to pumpkins and squash, and like their cousins, are technically fruit. When you see one hanging from the vine with the flower still attached at the end, it makes some sense, doesn't it?

Green beans

green beans Maybe if parents call green beans a fruit, kids will be more likely to eat them! (Photo: Mike Mozart/flickr)

Green beans certainly seem like vegetables, don't they? When a picky child doesn't want to eat green beans, what does mom or dad say? "Eat your vegetables." Maybe if green beans were called a fruit, which is technically accurate, the kid would be more inclined to eat them.

Okra

okra Okra — no matter which family you think it belongs to — has been gaining popularity for years. (Photo: Brent Hofaker/Shutterstock)

Okra's popularity has been growing in the past few years, and while it hasn't earned the status of an "it" vegetable yet like kale or cauliflower, it may still earn that moniker. If it does, you'll know it's really not an "it" vegetable. It's an "it" fruit.

Peppers

Habanero peppers Habanero peppers come in lovely shades. (Photo: Joshua Resnick/Shutterstock)

It really seems wrong that peppers are on this list, especially when you realize that something like a Habanero — a pepper that's 70 times hotter than a jalapeño — is technically a fruit. But whether the pepper is on the sweet side like a bell pepper or on the super spicy side like a Habanero, they are all derived from a flower and therefore are fruits.

Why do we call some fruits vegetables?

ratatouille Technically, this ratatouille is a savory, baked dish full of fruit. (Photo: Oksana Mizina/Shutterstock)

Why did all these fruits come to be known as vegetables? The best guess is that since they're not sweet because the natural sugars in them are low, people who cooked them put them in the vegetable category along with true vegetables that come from the leaves, stalks, roots, tubers and bulbs of a plant, or vegetables that are the flower of the plant, like broccoli.

But think about it. A dish like ratatouille made from tomato, eggplant and squash, botanically speaking, is just a baked fruit salad.

Robin Shreeves ( @rshreeves ) focuses on food from a family perspective from her home base in New Jersey.

8 fruits you think are vegetables
We treat tomatoes, cucumbers, peppers and eggplant as veggies, but botanically speaking, they're fruits. Here are more examples.