You have spent weeks nurturing tomato seedlings, carefully hardening them off, and finally transplanting them into the garden — only to watch aphids descend, hornworms appear, and fruit production disappoint. The good news? The right companion plants can reduce pest pressure best flowers for your vegetable garden companion planting herbs, boost yields by up to 20%, and make your garden more productive per square foot, according to research from West Virginia University. Companion planting is one of the oldest gardening techniques in the world, and modern science is catching up with what observant growers have known for generations — some plants genuinely help tomatoes thrive, while others actively work against them.
This guide covers the best and worst companion plants for tomatoes based on university extension research and peer-reviewed studies — not internet folklore. Whether you are working with a 4 x 4 foot (1.2 x 1.2 m) raised bed or a full backyard plot, you will know exactly what to plant next to your tomatoes, how far apart to space them, and which plants to keep well away. Setup takes about 30 minutes of planning and one afternoon of planting.
What you will learn in this guide:
Key Takeaway
Companion planting works best when you focus on a few validated combinations — basil, marigolds, and aromatic herbs — rather than trying to implement every recommendation you find online. The science supports specific pairings through pest deterrence, volatile signalling, and beneficial insect attraction, not through vague "good vibes" between plants.
Basil (Ocimum basilicum) is the single most research-backed tomato companion. A peer-reviewed study published in PMC (2024) found that volatiles released from basil leaves prime tomato plants to respond more rapidly to pest attack by boosting the expression of wound-response genes — specifically the Pin2 gene that produces protease inhibitors against chewing insects. This is not folklore. The priming effect works through airborne signals, meaning basil does not even need to touch the tomato plant to confer benefits.
Field trials show that tomato-basil intercropping at 50% basil density produces a Land Equivalent Ratio of 1.9, meaning the combined output from the same area nearly doubles compared to growing each crop separately. Plant basil 12 to 18 inches (30 to 45 cm) from your tomatoes in a 1:1 row arrangement for best results. One important myth to bust: Texas A&M AgriLife Extension confirms that basil does not improve tomato flavour — the benefits are purely pest-related and growth-related.
Marigolds (Tagetes patula) are the second essential tomato companion, and for a specific reason: their roots produce alpha-terthienyl, a compound that kills root-knot nematodes in the soil. Research from the University of Hawai'i demonstrated that French marigolds suppressed approximately 50% of root-knot nematode populations when planted immediately after a nematode-susceptible crop. The cultivar 'Single Gold' has been shown to suppress multiple nematode genera. African marigolds (Tagetes erecta) are less effective — stick with French marigolds for the best results. Beyond nematodes, marigolds produce pyrethrum that repels tomato hornworm moths and attract pollinators and ladybugs.
Aromatic herbs from the carrot family (dill, cilantro, parsley) provide a different kind of benefit: when they bolt and flower in summer heat, they attract ladybugs, lacewings, parasitic wasps, and hoverflies — all natural enemies of common tomato pests. Penn State Extension confirms that these flowering herbs are excellent for beneficial insect support. The key is to let them flower rather than harvesting them continuously. Their bloom period conveniently overlaps with peak tomato pest pressure in midsummer.
Other validated companions: Onions and garlic deter aphids and spider mites through sulphurous compounds. Nasturtiums work as trap crops — they attract aphids to themselves, pulling them away from your tomatoes. And legumes (beans, peas, clover) fix nitrogen in the soil through symbiotic bacteria in their root nodules, reducing your need for fertilizer. Our companion planting chart covers the full list of compatible pairings.
| Companion Plant | Primary Benefit | Mechanism | Spacing From Tomatoes |
| Basil | Pest defence + yield boost | Volatile signalling, thrip/hornworm deterrence | 12-18 in (30-45 cm) |
| French marigold | Nematode suppression | Alpha-terthienyl root exudates | Bed corners/margins |
| Dill / cilantro / parsley | Beneficial insects | Flowers attract lacewings, wasps, hoverflies | 18-24 in (45-60 cm) |
| Onions / garlic | Pest deterrence | Sulphurous compound emissions | 6-12 in (15-30 cm) |
| Nasturtiums | Trap crop for aphids | Preferential attraction away from tomatoes | 12-24 in (30-60 cm) |
| Beans / peas | Soil nitrogen enrichment | Biological nitrogen fixation via rhizobia | 12-18 in (30-45 cm) |
Sources: University of Minnesota Extension, Texas A&M AgriLife Extension, PMC (2024)
Why This Works: Guild Planting
In permaculture, this approach is called a guild — a group of plants selected to fill different functional roles so they support each other rather than compete. Your tomato sits at the center. Basil deters pests. Marigolds clean the soil. Beans fix nitrogen. Nasturtiums draw aphids away. Each plant has a job, and together they create a self-regulating system that needs less intervention from you. It is the same principle behind natural ecosystems, scaled down to a garden bed. You can explore this concept further in our beginner's guide to permaculture.
Just as some plants help tomatoes, others actively sabotage them. These incompatibilities are not guesswork — they involve documented allelopathic compounds, shared disease vulnerabilities, and competitive interactions that have been studied in controlled research.
Plants to Keep Away From Tomatoes
Fennel stunts the growth of all nightshade family members including tomatoes, peppers, and eggplants pepper companion planting guide through allelopathic root secretions. Brassicas (cabbage, broccoli, cauliflower, Brussels sprouts) also inhibit tomato growth — keep them at least 55 inches (140 cm) apart or time them for different seasons. Potatoes share the same disease and pest vulnerabilities as tomatoes (both are nightshades) and should be separated to prevent tomato spotted wilt virus spread. Walnut trees release juglone — a toxin so potent it kills tomato plants outright within the tree's root zone, according to Virginia Tech Extension. Corn competes intensely for resources and shares certain pest susceptibilities.
| Plant to Avoid | Reason | Minimum Distance |
| Fennel | Allelopathic compounds stunt nightshade growth | Keep out of garden entirely |
| Brassicas (cabbage, broccoli) | Glucosinolate allelopathy inhibits tomatoes | 55+ in (140+ cm) |
| Potatoes | Shared diseases (blight, TSWV), same family | Separate beds recommended |
| Walnut trees | Juglone toxin kills nightshades | 50-80 ft (15-24 m) from trunk |
| Corn | Intense resource competition, shared pests | Separate areas of garden |
Sources: Virginia Tech Extension, UC ANR Companion Planting Guide, Vegetables Journal
Spacing is where most companion planting advice falls short — you get told what to plant but not where to put it. Here are the numbers that matter.
Tomato plants need 24 to 36 inches (60 to 90 cm) between individual plants and 48 to 60 inches (120 to 150 cm) between rows, according to standard vegetable spacing guidelines. That leaves plenty of room to tuck companions into the gaps. Shorter, faster-maturing plants like lettuce, carrots, and parsley can occupy the space between tomato plants without violating primary spacing needs.
Here is the number most guides miss: Texas A&M AgriLife Extension found that companion plants can still be beneficial up to 5 feet (1.5 m) away from tomato plants. The volatile compounds responsible for pest deterrence travel through the air — basil does not need to be touching the tomato stem to help it. This gives you much more flexibility in your layout than traditional close-proximity advice suggests.
For raised beds, the University of Minnesota Extension notes that companion planting is especially effective because "it allows tighter plantings and more variety with easy access for cultivation." A 4 x 4 foot (1.2 x 1.2 m) raised bed can comfortably hold 2 indeterminate tomato plants on supports, with basil at the corners, beans climbing the supports, and lettuce or carrots filling the floor space. For containers, an 18 inch (45 cm) deep pot can support one tomato with a basil plant and a few marigolds around the rim — which is exactly the kind of setup that works for our healthy soil guide recommendations.
Get Our Free Companion Planting Chart
Join 10,000+ gardeners getting weekly tips on what to plant together, soil health, and permaculture techniques.
Send Me the ChartRather than memorizing a long list of companions, focus on building a simple layout that covers the key functional roles. Here is a step-by-step approach you can set up in one afternoon.
Place Your Tomatoes First
Space tomato plants 24 to 36 inches (60 to 90 cm) apart. Use cages, stakes, or trellises for indeterminate varieties. These are the anchors of your garden — everything else fits around them.
Add Basil on Both Sides
Plant one basil for every tomato, 12 to 18 inches (30 to 45 cm) away. This gives you the 1:1 row ratio that research shows produces the best combined yields. Harvest basil leaves regularly but let some plants flower for beneficial insects.
Ring the Edges With Marigolds
Plant French marigolds at the corners and margins of your bed. They suppress nematodes through their roots and attract pollinators through their flowers. Choose 'Single Gold' or other single-petal French varieties for best nematode control.
Fill the Floor With Low-Growing Companions
Tuck lettuce, spinach, or carrots into the spaces between tomato plants. These shallow-rooted crops draw water and nutrients from the top few inches of soil while tomato roots reach deeper — they share space without competing.
Add a Nitrogen Fixer
Plant bush beans or pole beans along the edges or train them up your tomato supports. They fix atmospheric nitrogen through bacteria in their root nodules, enriching the soil for your tomatoes and reducing your need for fertilizer.
Key Takeaway
You do not need to plant every possible companion — a tomato, a basil, a marigold, and a bean covers the four key functions (pest defence, nematode suppression, pollinator attraction, and nitrogen fixation). Start simple and expand as you get comfortable. Even two or three companions make a measurable difference. corn, beans, and squash guild
The internet is full of companion planting advice that sounds reasonable but does not survive contact with research. Here are the biggest myths — and what the evidence actually says.
Myth: Basil improves tomato flavour. This is repeated everywhere, but Texas A&M AgriLife Extension is clear: "Basil has no connection to the taste of tomatoes." Double-blind taste tests over three years at West Virginia University showed "no consistent preference for tomatoes grown with companions over those grown in monoculture." The benefits of basil are real — they are just about pest defence and yield, not taste.
Myth: Marigolds repel Colorado potato beetles. The University of Minnesota Extension states plainly: "Multiple studies have shown this to be untrue." Marigolds do suppress nematodes and deter hornworm moths — but potato beetles are not on the list.
Myth: Companions must be planted right next to tomatoes. Texas A&M found benefits extend up to 5 feet (1.5 m) away. Volatile compounds travel through air, so cramming companions directly against tomato stems is unnecessary and can create competition.
Why This Works: Observe and Interact
In permaculture, the first design principle is "Observe and Interact" — study what actually happens in your garden before making changes. The companion planting myths above persist because people repeat advice without observing results. The science-backed approach works better precisely because it is based on observed, measured outcomes rather than inherited assumptions. Your own garden will teach you which combinations work in your specific soil, climate, and pest environment — trust what you see, not just what you read.
Avoid planting fennel, brassicas (cabbage, broccoli, cauliflower), potatoes, and corn near tomatoes. Fennel and brassicas produce allelopathic compounds that stunt tomato growth. Potatoes share the same diseases, particularly late blight and tomato spotted wilt virus. Keep tomatoes well away from walnut trees — the juglone toxin released by walnut roots is lethal to nightshade family plants within the tree's drip line. Our companion planting chart has the full compatibility list.
Yes, cucumbers and tomatoes can grow together, though they are not the strongest companions. They share no allelopathic conflicts, and cucumbers can benefit from the trellis structures used for indeterminate tomatoes. The main concern is shared susceptibility to some fungal diseases, so ensure good air circulation with at least 24 inches (60 cm) between them and avoid overhead watering that keeps foliage wet.
Basil is the top choice — peer-reviewed research shows it primes tomato defence responses through volatile signalling and deters thrips, aphids, and hornworms. French marigolds repel hornworm moths through pyrethrum. Nasturtiums act as trap crops, attracting aphids to themselves instead of your tomatoes. For a broader approach, let dill, cilantro, and parsley flower to attract ladybugs and parasitic wasps that feed on tomato pests.
In a 4 x 4 foot (1.2 x 1.2 m) raised bed, plant 2 indeterminate tomatoes on supports, basil at the corners, French marigolds along the edges, and fill the floor with lettuce or carrots. Bush beans can go between the tomatoes. This covers pest defence, nematode control, pollinator attraction, and nitrogen fixation in a compact space. The University of Minnesota Extension specifically recommends raised beds for companion planting because they enable tighter, more diverse plantings.
French marigolds are the top recommendation due to their proven nematode-suppressing properties and hornworm moth deterrence. Nasturtiums serve as aphid trap crops. Calendula, cosmos, and zinnias attract pollinators and beneficial predatory insects including hoverflies and ladybugs. For maximum benefit, choose single-petal flower varieties over double-petal types — beneficial insects access nectar and pollen more easily from simple flower structures.
Ready to Grow Smarter?
Get our free beginner's guide to permaculture gardening — 12 pages of practical tips you can use this weekend.
Download the Free Guidedoes epsom salt help tomato plants cucumber companion plants