
Yardtally is reader-supported. Some links on this page are affiliate links. As an Amazon Associate, Yardtally earns from qualifying purchases. See our Affiliate Disclosure.
Companion planting is the practice of growing certain plants near each other because they genuinely benefit one another — through pest deterrence, pollinator attraction, nitrogen fixation, or physical support. It’s been used for thousands of years and the core principles hold up well. The Three Sisters method — corn, beans, and squash grown together — was practiced by Indigenous peoples across the Americas long before modern agriculture existed, and it works for the same reasons today: the corn provides a trellis for beans, the beans fix nitrogen for the corn and squash, and the squash leaves shade the ground to retain moisture and crowd out weeds.
Not every companion planting claim is equally reliable. The chart and pairings below focus on combinations with real, documented mechanisms — not just gardening folklore. If a pairing is on this list, there’s a reason it works. If it’s in the “what to keep apart” section, same story.
How Companion Planting Actually Works
There are four main ways companion plants help each other — understanding these makes it easier to choose pairings that fit your specific garden rather than just following a list:
Pest Deterrence
Some plants produce compounds that repel, confuse, or trap harmful insects. Basil repels whiteflies, aphids, and spider mites — partly through volatile oils, partly by masking the scent of nearby plants from pests that hunt by smell. Marigolds produce a root secretion that kills soil nematodes, which damage the roots of tomatoes, peppers, and other nightshades. These aren’t folklore — both have documented mechanisms and consistent results in home gardens.
Nitrogen Fixation
Legumes — beans, peas, clover — form a symbiosis with soil bacteria that converts atmospheric nitrogen into a form plants can absorb. Plant beans near heavy feeders like corn, squash, or tomatoes and the surrounding soil gets a measurable nitrogen boost. This is one of the oldest and most reliable companion planting benefits, and it’s why beans appear in so many traditional polyculture systems.

Pollinator Attraction
Flowers grown near vegetables attract bees, hoverflies, and other pollinators that improve fruit set on cucumbers, squash, peppers, and tomatoes. Borage, dill, and marigolds are particularly effective. A single borage plant in a raised bed can dramatically increase cucumber and squash yields simply by keeping pollinators working the area.
Physical Support and Space Use
Taller plants can shade heat-sensitive crops that bolt in summer sun — lettuce and spinach do well in the afternoon shade cast by tomato plants or trellised cucumbers. Deep-rooted plants and shallow-rooted plants can share the same bed without competing. These structural pairings are especially useful in raised beds where space is limited.
Companion Planting Chart — Best Pairings
Tomatoes
Best companions: basil, marigolds, carrots, parsley, borage, garlic
Keep away from: potatoes (share blight), fennel (allelopathic — inhibits growth of most plants nearby), brassicas (cabbage family)
Basil is the strongest tomato companion with the most evidence behind it — plant it 12 to 18 inches from tomato stems. Marigolds planted at bed corners deter soil nematodes that attack tomato roots. Garlic planted at the base of tomato plants deters aphids and spider mites. Borage attracts pollinators and is said to improve tomato flavor, though the flavor claim is anecdotal — the pollinator benefit is real.
The tomato-potato combination is one of the most important pairings to avoid. Both are nightshades and share the same blight pathogen — planting them near each other accelerates the spread of late blight if it enters your garden.
Peppers

Best companions: basil, carrots, tomatoes, marigolds, spinach
Keep away from: fennel, brassicas
Peppers and tomatoes are compatible neighbors — they share similar water and sun needs, and basil benefits both. Spinach planted around pepper bases stays cool in the shade the pepper plant provides and acts as a living mulch to retain moisture.
Cucumbers
Best companions: beans, peas, radishes, marigolds, borage, dill, sunflowers
Keep away from: potatoes, aromatic herbs (sage, rosemary), melons (compete for space and attract similar pests)
Beans planted near cucumbers fix nitrogen in the soil and the two crops don’t compete for nutrients meaningfully. Radishes planted at cucumber bases deter cucumber beetles — one of the most damaging cucumber pests. Borage and dill attract the pollinators cucumbers need for fruit set.
Beans and Peas
Best companions: carrots, cucumbers, squash, corn, radishes, strawberries
Keep away from: onions, garlic, leeks, chives (alliums stunt nitrogen fixation in legume roots — this is one of the most consistent antagonist relationships in companion planting)
Beans and peas are nitrogen fixers, so they benefit almost everything planted near them. The one rule that matters: keep them away from the entire allium family. Onions, garlic, and leeks inhibit the soil bacteria that allow legumes to fix nitrogen — planting them together undermines the main benefit beans provide.
Lettuce and Leafy Greens
Best companions: carrots, radishes, strawberries, tomatoes, tall flowers
Keep away from: celery, parsley (can stunt lettuce growth)
Lettuce is one of the most flexible companion plants in the garden. It grows well in partial shade, so it fits naturally under taller plants — tomatoes, trellised cucumbers, or sunflowers — where it stays cool and productive longer into summer. Radishes planted with lettuce deter aphids and are harvested before they compete for space.
Carrots
Best companions: tomatoes, onions, leeks, rosemary, sage, lettuce
Keep away from: dill (inhibits carrot growth when mature), parsnips (compete and attract the same pests)
Carrots and tomatoes are classic companions — tomatoes repel carrot fly and carrots aerate the soil around tomato roots. Onions and leeks near carrots confuse carrot fly with their strong scent. Rosemary and sage serve the same function. One note on dill: young dill is fine near carrots, but mature dill inhibits carrot development — harvest or relocate dill before it fully matures if you’re growing it near carrots.

Squash and Zucchini
Best companions: corn, beans, nasturtiums, borage, marigolds
Keep away from: potatoes, pumpkins (compete aggressively for space)
Squash is the third sister in the Three Sisters combination — corn provides vertical structure, beans fix nitrogen, and squash leaves shade the ground to retain moisture and suppress weeds. Nasturtiums planted around squash act as a trap crop for aphids, drawing them away from the squash itself.
Marigolds (Plant Everywhere)
Marigolds are the single most useful companion plant in the vegetable garden and deserve a dedicated mention. Their root secretions kill soil nematodes — microscopic worms that damage roots of tomatoes, peppers, and other vegetables. Their flowers attract pollinators and beneficial insects that prey on aphids and whiteflies. And they act as a mild trap crop for spider mites.
Plant marigold seeds along the borders of every raised bed. They earn their space more than any other companion plant.
What to Keep Apart — Combinations to Avoid
Knowing what not to plant together matters as much as knowing what works. These are the most consistent antagonist pairings:
Fennel — Keep It Isolated
Fennel is allelopathic — it produces chemicals that inhibit the growth of most other plants. Tomatoes, peppers, beans, and most herbs all perform worse near fennel. If you want to grow fennel, give it its own container or a bed corner well away from everything else. It’s the one plant in a vegetable garden that’s genuinely better off alone.
Onions and Garlic Near Beans and Peas
The allium family — onions, garlic, leeks, chives — inhibits nitrogen fixation in legume roots. Since beans and peas are grown specifically for their nitrogen-fixing benefit, planting them near alliums defeats the purpose. Keep these families on opposite sides of the garden.
Tomatoes and Potatoes
Both are nightshades and share the same late blight pathogen. If blight enters your garden, proximity between tomatoes and potatoes accelerates the spread dramatically. Keep them as far apart as your space allows.
Brassicas and Everything Else (Almost)
Cabbage, broccoli, cauliflower, and kale are heavy feeders that compete aggressively with most other vegetables. They also attract caterpillars and other pests that then move to neighboring plants. Keep brassicas in their own dedicated bed where possible, or pair them only with their known companions — dill, celery, onions, and aromatic herbs.
Simple Companion Planting Combinations That Work Every Time
If you want to start with companion planting without overcomplicating it, these three combinations work reliably in almost any garden:
Tomatoes + Basil + Marigolds
Plant basil 12 to 18 inches from tomato stems and marigolds at the corners of the bed. The basil deters whiteflies and aphids, the marigolds handle soil nematodes and attract pollinators. This is the highest-return companion combination in the vegetable garden.
Pick up basil seeds to start indoors alongside your tomato seeds — both go in the ground after last frost and they’ll be the right size to transplant together.
The Three Sisters — Corn + Beans + Squash
Plant corn first and let it establish. Once corn is 4 to 6 inches tall, plant beans at the base of each stalk. When beans sprout, plant squash between the rows. The corn provides a trellis, the beans fix nitrogen, the squash shades the ground. This combination has fed people for thousands of years for good reason.

Carrots + Onions + Lettuce
Onions deter carrot fly with their scent. Lettuce fills gaps between rows and stays cool in partial shade. Carrots aerate the soil as they grow, which benefits the shallow-rooted lettuce. All three have compatible water and sun needs and none competes meaningfully with the others.
A Note on Neem Oil as a Backup
Companion planting reduces pest pressure — it doesn’t eliminate it. Even a well-planned bed will have pest issues some seasons. Neem oil is the best organic backup for a companion-planted garden because it targets a broad range of pests without harming beneficial insects when applied correctly (spray in the evening when pollinators aren’t active, never on flowers).
Garden stakes are useful for marking companion zones in a raised bed before planting — label each zone so you remember what’s paired with what when you’re transplanting seedlings weeks later.
Plan Your Bed Before You Plant
The easiest way to use this companion planting chart is to plan your bed layout on paper before a single seed goes in. Group your heavy feeders (tomatoes, peppers, squash) with their companions, note your nitrogen fixers (beans, peas) and where they’ll go, and mark the border for marigolds. A five-minute sketch prevents the most common companion planting mistake — planting something in the wrong spot and not being able to move it once it’s established.
If you haven’t built your raised bed yet, our guide on how to build a raised garden bed covers the full construction process — lumber, sizing, irrigation setup, and soil mix.
If you’re new to growing vegetables and want to know which ones to start with before worrying about companion placement, our guide on the easiest vegetables to grow for beginners covers the most forgiving crops and how to get a real harvest your first season.
