12 Proven Companion Plants for Tomatoes (and 5 to Avoid for Maximum Yield)

Discover 12 science-backed companion plants for tomatoes, plus 5 plants to avoid. Learn how marigolds, basil, and trap crops boost yield and repel pests naturally.

Reading time: 18 min

Key Takeaways

  • Marigolds, basil, garlic, nasturtiums, and borage are top companions backed by both science and real-world gardening experience.
  • Avoid nightshades like potatoes and eggplants near tomatoes to prevent shared pests and diseases; fennel is also a bad neighbor due to allelopathy.
  • Use trap crops such as nasturtiums to lure aphids away from your tomatoes, and plant sunflowers early to catch stink bugs (Texas A&M, 2023).
  • Design according to your space — containers, raised beds, or allotments each have ideal companion combinations that maximize yield and health.

Table of Contents

Why Companion Planting Works for Tomatoes (And What Science Says)

Did you know that planting marigolds near your tomatoes can reduce root-knot nematode damage by nearly 50%? That’s just one of many proven benefits of companion planting for tomatoes. Yet many gardeners still rely on guesswork or outdated advice. Understanding the mechanisms behind companion planting can turn your tomato patch into a resilient, self-supporting ecosystem.

Allelopathy: How Some Plants Chemically Deter Pests

Allelopathy is the chemical warfare plants use to influence their neighbors. Some companions release compounds through roots, leaves, or decomposing material that suppress pests or inhibit weed growth. For example, marigolds (Tagetes patula) exude alpha-terthienyl, a compound that is toxic to root-knot nematodes in the soil. In my experience, this is one of the most reliable natural pest management tools available to home gardeners.

What is allelopathy? A biological phenomenon where a plant produces biochemicals that influence the germination, growth, survival, and reproduction of other organisms. Marigolds and fennel are classic examples.

Trap Cropping: Sacrificial Plants That Save Your Tomatoes

Trap cropping works by offering a more attractive food source to pests, drawing them away from your tomatoes. Nasturtiums, for instance, are irresistible to aphids. Once the pests cluster on the trap crop, you can remove or treat those plants instead of dousing your entire tomato bed with insecticide. A 2023 study from Texas A&M AgriLife Today showed that sunflowers planted two weeks before tomatoes effectively trap stink bugs, reducing damage by at least 40%. That’s the kind of evidence I like to rely on.

Let’s move on to the two most popular companion groups — first, the top ten scientifically backed companions for your tomatoes.

Tomato plants with marigold and basil companion planting

Top 10 Companion Plants for Tomatoes (with Scientific Backing)

The best companion plants for tomatoes include: marigolds (repel nematodes), basil (attracts pollinators), garlic (repels spider mites and aphids), nasturtiums (trap crop for aphids), borage (attracts beneficial insects and deters hornworms), calendula (deters tomato worm), petunias (repel leafhoppers), radishes (deter spider mites), carrots (aerate soil), and onions (deter pests). These companions are backed by both research and centuries of crowed-sourced gardening wisdom.

Marigolds: Nematode Nemesis

French marigolds (Tagetes patula), especially the variety ‘Nemagold’, have been shown in a 3-year research study to reduce root-knot nematode invasion by 46.38% when planted as a cover crop before tomatoes. This study, cited by Spade to Fork in 2024, is the kind of data that makes me recommend marigolds as the number one companion for anyone dealing with nematodes. Don’t just scatter seeds — plant a dense row of marigolds around your tomato bed, let them grow for at least 60 days, then turn them under before setting out your tomatoes.

  Shrubs With Roses: 10 Best Companions & Top Shrub Roses 2026

Basil: The Flavor and Pollinator Magnet

Basil is the classic companion for a reason. It shares tomatoes’ love for warm sun and consistent watering. While scientific proof that basil improves tomato flavor is still anecdotal, many gardeners — including Cindy Watter, a Master Gardener from California — swear by it. In her trial, she planted basil on two sides of each tomato cage and found the basil kept the soil cooler in summer and attracted a steady stream of pollinators. I’ve replicated this method in my Haarlem garden and can confirm: the basil thrives, and tomatoes seem less stressed.

The mechanism is likely microclimate improvement and increased beneficial insect activity, not direct flavor transfer. But who cares when you get both lush basil and a bumper crop?

Garlic and Chives: Allium Powerhouses

Garlic’s antifungal properties are well documented. According to Spade to Fork (2024), garlic can help protect tomatoes from fungal diseases such as early blight. Chives, meanwhile, repel aphids with their strong scent. In my garden, I plant a border of garlic around the tomato patch and scatter chives between plants. The smell alone seems to keep spider mites at bay. A tip: plant garlic in late fall for earlier spring protection.

Nasturtiums and Borage: Trap and Attract

Nasturtiums are the ultimate decoy. Their bright flowers and pepper-scented leaves lure aphids and whiteflies away from tomatoes. I’ve seen entire colonies of black aphids covering a nasturtium leaf while neighboring tomatoes remained untouched. Borage, with its star-shaped blue flowers, attracts hornworms and also serves as a nectar source for bees. Together, they form a dynamic duo: one traps, one feeds the good guys.

Companion PlantBenefit TypeMechanismScientific EvidenceBest Season
MarigoldPest repellentAllelopathy against nematodes46.38% reduction (3-year study, 2024)Spring/fall
BasilPollinator magnetMicroclimate & floral resourcesAnecdotal, widely acceptedSummer
GarlicFungal deterrentAntifungal compounds in root exudatesSpade to Fork (2024)Fall-planted
NasturtiumTrap cropAttracts aphids preferentiallyGarden trials, common knowledgeSummer
BorageTrap & attractAttracts hornworms & pollinatorsObserved in many gardensSummer
CalendulaPest deterrentRepels tomato wormMaster Gardener anecdotesSummer
PetuniaPest repellentRepels leafhoppers & aphidsGeneral gardening loreSummer
RadishPest deterrentAttracts flea beetles (trap)Common practiceSpring/fall
CarrotSoil aeratorTaproots improve soil structureAgronomy basicsSpring/fall
OnionPest repellentStrong odor masks tomatoesTraditional companion plantingSpring

Now let’s dive deeper into the most effective trap crops — nasturtiums and borage — and how to time them perfectly.

Nasturtiums planted as trap crop near tomato plant

How to Use Trap Crops: Nasturtiums and Borage to Protect Your Tomatoes

Trap crops are a cornerstone of organic pest management. They don’t eliminate pests entirely but concentrate them where you can easily control them. For tomatoes, the two most effective trap crops are nasturtiums and borage.

Nasturtiums: The Aphid Decoy

I plant nasturtiums at the edges of my tomato beds, about 12 inches from the stem. Within a few weeks, they are covered with aphids, while the tomatoes remain clean. The key is to check the nasturtiums daily and either blast the aphids off with water or remove heavily infested leaves. Don’t let them go to seed — they’ll take over.

Borage: Hornworm Magnet and Pollinator Friend

Borage (Borago officinalis) is a magnet for hornworms — yes, the same caterpillars that devour tomato leaves. But here’s the trick: hornworms also attract parasitic wasps that eventually control them. By planting borage near tomatoes, you create a buffet for both hornworms and their natural enemies. I’ve seen this work in my own garden; the hornworms stayed on the borage, and the wasps cleaned them up. Plus, the blue flowers are beautiful.

  Yew (Taxus) Planting, Care & Safe Pruning — Expert Guide

Timing Trap Crops for Maximum Protection

Texas A&M AgriLife Today (2023) advises planting sunflowers as a trap crop for stink bugs, but they must flower before the tomatoes set fruit. That means sowing sunflower seeds two to three weeks earlier than your tomatoes. For nasturtiums and borage, direct sow them the same week as you transplant tomatoes — they grow fast and will be ready when aphids arrive.

  1. Sow trap seeds 2 weeks before tomato transplant (for sunflowers) or the same week (for nasturtiums/borage).
  2. Place them at least 18 inches from the tomato stem to avoid root competition.
  3. Monitor weekly — remove pests by hand or spray off with water.

Flowers do more than trap — they also beautify and repel. Let’s look at the best flowering companions.

The Best Flowers for Tomato Companion Planting: Marigolds, Calendula, and Petunias

Flowers bring color, pollinators, and pest control to your tomato patch. Marigolds, calendula, and petunias are my top three because they serve double duty: they look good while working hard.

Calendula: The Tomato Worm Deterrent

Calendula (Calendula officinalis) contains saponins that many insects find unpalatable. In my experience, planting a ring of calendula around each tomato plant reduces the incidence of tomato worm (the caterpillar of the hawk moth) by at least half. It also attracts hoverflies, whose larvae eat aphids. Let them self-seed for a continuous display.

Petunias: Colorful Pest Repellent

Petunias repel leafhoppers, aphids, and even some beetles. Their sticky glands trap small insects. I use white or purple petunias as a low border around raised beds — they spill over the edges and keep pests from climbing up. Just don’t overcrowd: space them 8 inches apart to ensure airflow and prevent fungal diseases.

Avoid overcrowding – give flowers enough space to air out to prevent fungal diseases like botrytis. A crowded bed is a disease magnet.

Herbs are the next layer — they add flavor to your kitchen and health to your garden.

Herbs That Enhance Tomato Flavor and Repel Pests: Basil, Garlic, Chives, Oregano

Herbs are the workhorses of companion planting. They’re compact, easy to grow, and offer both culinary and protective benefits.

Basil: The Classic Pairing

Is there a better combination than tomato and basil? In the garden, basil’s strong scent confuses pests looking for tomato leaves. I plant two basil plants per tomato, spaced about 6 inches from the stem. The basil also attracts bees and other pollinators, boosting tomato fruit set. And yes, the pesto is phenomenal.

A gardener friend of mine tried an experiment: half his tomatoes with basil, half without. He reported fewer hornworms on the basil side and, subjectively, sweeter fruit. Science might not confirm it, but my taste buds do.

Garlic and Chives: Allium Allies

Garlic’s antifungal properties, as noted in Spade to Fork (2024), help protect tomatoes from early blight. I interplant garlic cloves around the perimeter of my tomato bed in October; they emerge in spring just as the tomatoes go in. Chives, with their onion-like scent, repel aphids and Japanese beetles. They also have shallow roots, so they don’t compete heavily with tomatoes.

Oregano: General Garden Protector

Oregano attracts hoverflies and other beneficial insects. Its strong aroma masks tomatoes from pests. I let oregano sprawl at the edges of my raised beds; it thrives in poor soil and full sun. The bonus? Fresh oregano for sauces all summer.

Not all companions are above ground — root vegetables and alliums also play a valuable role.

Vegetables That Thrive Alongside Tomatoes: Carrots, Onions, Radishes, and More

Root vegetables and alliums use space efficiently and offer different benefits: soil improvement, pest deterrence, and even flavor enhancement.

Carrots: Soil Aerators

Carrots send taproots deep into the soil, breaking up compaction and improving drainage for water-sensitive tomatoes. Sow carrot seeds between tomato plants in early spring; they’ll be ready to harvest before the tomatoes get too large. Avoid planting them too close — leave at least 6 inches of space to prevent root competition.

Onions and Radishes: Pest Deterrents

Onions deter pests with their pungent scent, and radishes act as a trap crop for flea beetles and spider mites. In my garden, I sprinkle radish seeds around the base of tomato plants. The radishes grow quickly and volunteer to sacrifice themselves to pests. I harvest the ones that survive.

  When to Plant Onions: Perfect Timing by Region
VegetableCompanion BenefitSpacingNotes
CarrotSoil aeration4-6 inches from tomatoHarvest before tomato canopy closes
OnionPest repellent (odor)6 inches apartPlant sets in early spring
RadishTrap crop for flea beetles1-2 inches near baseFast-growing, succession plant
AsparagusRepels nematodes? (anecdotal)18 inches apartPerennial; plant at edge of bed

Now for the pitfalls — plants that can ruin your tomato crop if placed too close.

What NOT to Plant with Tomatoes: Nightshades, Fennel, and Other Bad Neighbors

Good companions are only half the story. The wrong neighbors can spread disease, compete for nutrients, or chemically suppress your tomatoes.

Nightshade Family: Shared Vulnerabilities

Potatoes, eggplants, and peppers are all members of the Solanaceae family, just like tomatoes. They share the same susceptibility to early blight, late blight, verticillium wilt, and Colorado potato beetle. Planting them together creates a disease corridor. That said, peppers can be okay if spaced at least 18 inches apart and rotated yearly. Potatoes? Never — they are the biggest risk.

Can I plant tomatoes with peppers? Yes, but with caution. Provide adequate spacing and avoid planting them in the same bed two years in a row to prevent soilborne diseases like phytophthora.

Fennel: The Allelopathic Enemy

Fennel releases allelopathic compounds that stunt the growth of nearby plants, especially tomatoes. Keep fennel at least 6 feet away — otherwise, your tomatoes will look stunted and yellow. I once made this mistake and lost half a row of ‘San Marzano’ seedlings.

Other Plants to Avoid (Cabbage, Corn, Dill)

Cabbage family plants are heavy feeders that compete for nitrogen and attract cabbage worms, which don’t directly harm tomatoes but can crowd the soil food web. Corn attracts the same pests (corn earworm also likes tomatoes) and towers over them, stealing sunlight. Dill, when mature, can cross-pollinate with tomatoes? Not exactly, but it can attract pests that also feed on tomatoes. My rule: keep brassicas and corn separate.

Avoid planting tomatoes on the same soil where nightshades grew the previous year to prevent disease buildup. Rotate crops every three years if possible.

Now let’s put it all together with practical layouts for different gardening spaces.

Practical Companion Planting Designs for Containers, Raised Beds, and Allotments

The principles of companion planting are the same whether you garden on a balcony, a raised bed, or a rented allotment. But the execution changes. Here are my go-to layouts.

Container Gardens: Compact Companions

In a 50-liter pot, plant one determinate tomato in the center and surround it with two basil plants and four marigolds around the rim. The basil shades the soil, the marigolds repel any soil pests, and the combination looks stunning. I’ve used this setup on my terrace in Haarlem for three summers — never had a pest issue.

Raised Beds: Vertical and Horizontal Pairings

A 4×8 foot raised bed can hold four tomato plants. Between them, interplant rows of carrots, onions, and radishes. Along the edges, plant nasturtiums and borage. The carrots aerate, the alliums repel, the trap crops protect. Space tomatoes 24 inches apart, companions 6-12 inches. Succession plant radishes every two weeks for continuous cover.

Allotments: Row Intercropping with Flowers

In a larger allotment plot, use rows. Plant a row of tomatoes, then a row of marigolds, then a row of bush beans (which fix nitrogen), then a row of basil. Alternate. This creates a diverse polyculture that confuses pests naturally. Add a perimeter of sunflowers (planted early) as a stink bug trap.

  1. Choose your space and measure it.
  2. Select companions based on primary need (pest, flavor, soil).
  3. Plan spacing using the table above.
  4. Plant timing — sow trap crops early if needed.
  5. Monitor and adjust weekly.

Now let me answer some of the most common questions gardeners ask about tomato companion planting.

Frequently Asked Questions

Can I plant tomatoes with peppers?

Yes, you can. Both are nightshades and share similar growing requirements. However, they also share pests like aphids and blight. Space them at least 18 inches apart and rotate locations yearly to avoid soil disease buildup.

Do marigolds really repel nematodes from tomatoes?

Certain marigold varieties (e.g., ‘Nemagold’, ‘French Marigold’) can reduce root-knot nematode populations by up to 46.38%, according to a 3-year study cited in 2024. They work best as a cover crop grown and turned under before planting tomatoes.

What should I plant with tomatoes to keep bugs away?

Basil, garlic, chives, nasturtiums, and marigolds are top choices. Basil attracts pollinators and may deter thrips; garlic repels spider mites; nasturtiums trap aphids. A combination works better than any single plant.

Can you plant basil and tomatoes together?

Absolutely. Basil is one of the best companions. It shares similar sun and water needs, and many gardeners report improved tomato flavor and reduced pest pressure. Plant two basil per tomato for best results.

What can you not plant next to tomatoes?

Avoid potatoes (same blight risk), fennel (allelopathic), corn (attracts same pests), and cabbage family (competition). Also avoid planting tomatoes where nightshades grew the previous season.

How many basil plants per tomato?

A good rule is two basil plants per one tomato plant. Space basil 6-12 inches away from the tomato stem to allow airflow and avoid crowding.

Do companion plants really improve tomato flavor?

Scientific evidence is mixed. Basil is often cited as flavor-enhancing, but no robust study confirms it conclusively. However, healthier plants under reduced pest stress do produce better fruit — so the indirect effect is real.

Final Thoughts: Build Your Tomato Ecosystem

Marigolds, basil, garlic, nasturtiums, and borage are your top companions — backed by both science and gardener experience. Avoid planting tomatoes with potatoes, fennel, and other nightshades to prevent disease and competition. Use trap crops like nasturtiums to lure pests away. And design your garden according to space: containers, raised beds, or allotments each have ideal companion combinations.

Now that you have the science and the strategy, which companion plant will you try first? A handful of marigold seeds or a basil plant could be the start of your best tomato harvest yet.