Some vegetables thrive when planted next to the right neighbors. Others struggle, stunt, or get attacked by pests when paired with the wrong ones. Companion planting is the practice of intentionally placing plants near each other to improve growth, deter pests, attract pollinators, and make the most of your garden space.
This guide covers the science behind why it works, the best plant pairings for common vegetables, combinations you should avoid, and a reference chart you can print and bring to your garden.
Key Takeaways
- Companion planting improves yields by pairing plants that share resources, deter pests, or attract beneficial insects.
- The Three Sisters combination (corn, beans, squash) is the most studied and reliable companion planting system for vegetable gardens.
- Chemical signals in roots and leaves explain why some plants repel pests or suppress weeds when grown near certain neighbors.
- Bad pairings are real: fennel, onions, and brassicas each have documented incompatibilities that reduce yields.
- A companion planting chart simplifies planning by showing good and bad neighbors for each vegetable at a glance.
- Distance and density matter: most companion effects only work within 12 to 18 inches of the target plant.
What Is Companion Planting and Why Does It Work?
Quick Answer: Companion planting places specific plants near each other to trigger natural benefits like pest deterrence, nitrogen fixing, pollinator attraction, and ground shading. These effects come from root chemicals, scent, and plant structure rather than random folklore.
Plants communicate and compete through chemistry. Their roots release compounds called root exudates (liquids secreted into the soil) that affect neighboring plants, soil bacteria, and insects. Some of these compounds suppress fungal growth. Others attract predatory insects that eat common garden pests.
Leaf and flower scents work above ground. Aromatic herbs like basil and dill release volatile compounds that confuse or repel insects looking for host plants. A tomato hornworm, for example, uses scent to locate tomato plants. Nearby basil disrupts that scent trail.
Structural benefits are just as important. Tall plants provide shade that keeps moisture-loving crops cool. Ground-hugging plants act as living mulch, reducing weeds and holding soil moisture. Climbing plants trained up taller neighbors use vertical space efficiently.
What Is Nitrogen Fixing and Why Does It Help Vegetables?
Nitrogen fixing is the process where certain plants, mostly legumes like beans and peas, pull nitrogen gas from the air and convert it into a form plants can absorb through the soil. Most vegetables need nitrogen to produce green leaves and strong stems.
Legumes form a partnership with soil bacteria called Rhizobium. These bacteria live in small nodules on legume roots. When the legume plant dies or is cut back, those nodules break down and release nitrogen into the surrounding soil. Plants nearby benefit directly.
Does Companion Planting Actually Have Scientific Support?
Yes, selectively. Some pairings are well-supported by research. Others are based on traditional practice with limited controlled study. The Three Sisters combination (corn, beans, squash) has been validated in multiple agricultural studies. Basil’s effect on aphids near tomatoes has shown measurable results in field trials. Marigolds reducing nematode (microscopic soil worms that damage roots) populations near tomatoes is supported by university extension research.
Many folk pairings, like planting rue near brassicas, have less evidence. They may work in some conditions and not others. Treat companion planting as a layer of your garden strategy, not a guaranteed outcome.
What Are the Best Companion Plants for Tomatoes?

Quick Answer: Basil, marigolds, carrots, and parsley are the strongest companions for tomatoes. Basil repels aphids and thrips, marigolds deter nematodes and whiteflies, and carrots loosen soil around tomato roots. Plant companions within 18 inches for best effect.
Tomato Companion Planting at a Glance
| Companion Plant | Primary Benefit | Mechanism | Ideal Distance |
|---|---|---|---|
| Basil | Repels aphids, thrips, spider mites | Volatile leaf compounds disrupt pest scent navigation | 12–18 inches |
| Marigold (French) | Reduces root-knot nematodes, deters whiteflies | Root exudates toxic to nematodes; scent confuses whiteflies | 12–24 inches |
| Carrot | Aerates soil around tomato roots | Deep taproot breaks compacted soil layers | 6–12 inches |
| Parsley | Attracts predatory wasps that eat tomato hornworms | Flower nectar feeds parasitic wasps | 12–18 inches |
| Borage | Repels tomato hornworm; attracts pollinators | Scent masking and flower nectar for bees | 18–24 inches |
Avoid planting fennel, corn, or brassicas near tomatoes. Fennel releases chemicals that stunt tomato growth. Corn attracts the same caterpillar species (corn earworm and tomato fruitworm are the same insect) that targets tomatoes, doubling pest pressure in one area.
Which Plants Make the Best Companions for Peppers?
Quick Answer: Peppers grow well next to basil, carrots, spinach, and marigolds. Basil improves pepper flavor and deters aphids. Spinach acts as ground cover that retains moisture. Keep peppers away from fennel and brassicas, which compete or inhibit growth.
Peppers and tomatoes are in the same plant family (Solanaceae), so they share many companion preferences. Basil works as well for peppers as it does for tomatoes. Low-growing spinach fills space between pepper plants, keeping weeds down and soil temperature stable.
Carrots are a good structural companion here too. Their thin leaves don’t compete for light, and their roots work at a different soil depth than pepper roots, so they share the same ground without competing for nutrients.
What Are Good and Bad Companions for Cucumbers?
Quick Answer: Cucumbers thrive next to beans, radishes, dill, and nasturtiums. Radishes deter cucumber beetles when planted at the border. Nasturtiums act as a trap crop, drawing aphids away from cucumber vines. Keep cucumbers away from sage and potatoes.
Cucumber Companion Planting Table
| Plant | Good or Bad Companion | Reason | Notes |
|---|---|---|---|
| Radish | Good | Deters cucumber beetles | Plant at bed borders, 6 inches from vines |
| Nasturtium | Good | Trap crop for aphids | Plant at edge of bed; remove heavily infested plants |
| Dill (young) | Good | Attracts beneficial insects | Remove before dill flowers to prevent flavor transfer |
| Beans | Good | Adds nitrogen to soil | Bush beans preferred over pole beans to avoid shading |
| Sage | Bad | Inhibits cucumber growth | Keep at least 3 feet away |
| Potato | Bad | Shared blight risk increases disease pressure | Avoid growing in same bed or adjacent beds |
How Does the Three Sisters Companion Planting System Work?

Quick Answer: The Three Sisters system plants corn, beans, and squash together. Corn provides a trellis for beans. Beans fix nitrogen that feeds corn and squash. Squash leaves shade the soil, reducing weeds and retaining moisture. This method originated with Indigenous North American farmers.
This system is the most documented and reliably productive companion planting strategy for vegetables. Each plant fills a specific role in a self-supporting ecosystem.
Corn grows tall and fast, reaching 6 to 8 feet. Pole beans climb the corn stalks rather than needing a separate trellis. The beans fix nitrogen into the soil at a rate of roughly 40 to 200 pounds per acre depending on variety and conditions, feeding the heavy-feeding corn and squash plants nearby.
Squash sprawls across the ground between the corn and bean plants. Its large, rough-textured leaves shade out weeds and keep the soil from drying out in summer heat. The scratchy leaf surface also deters animals like raccoons from walking through the bed.
How to Set Up a Three Sisters Bed
- Start with a bed at least 10 x 10 feet. Smaller beds reduce yield and crowding space.
- Build mounds of soil 12 inches high and 18 inches wide. Space mounds 4 feet apart center to center.
- Plant 4 to 6 corn seeds per mound. Wait until corn is 6 inches tall before planting beans.
- Add 4 to 6 bean seeds per mound, 6 inches from corn stalks. Beans need corn to be established first.
- Plant 2 to 3 squash seeds per mound one week after beans. One squash plant per mound is enough once they establish.
- Water deeply at the mound base to avoid wetting squash leaves, which increases mildew risk.
What Companions Work Best for Root Vegetables Like Carrots and Beets?
Quick Answer: Carrots grow best with onions, leeks, rosemary, and sage. Onions and leeks repel carrot fly through scent masking. Beets pair well with garlic and lettuce but should be kept away from pole beans, which inhibit beet growth.
Root Vegetable Companion Planting Reference
| Root Vegetable | Best Companions | Worst Companions | Primary Benefit of Good Pairing |
|---|---|---|---|
| Carrot | Onion, leek, rosemary, sage | Dill (mature), parsnip | Onion scent masks carrot fly attraction |
| Beet | Garlic, lettuce, cabbage | Pole beans, mustard | Garlic deters aphids; lettuce shades soil |
| Radish | Cucumber, lettuce, peas | Hyssop, turnip | Radish acts as trap crop for flea beetles |
| Turnip | Peas, nasturtium | Knotweed, hedge mustard | Peas improve nitrogen for leafy turnip growth |
| Parsnip | Peas, peppers, garlic | Carrot, celery | Garlic deters root fly; peas fix nitrogen |
Mature dill is a bad neighbor for carrots even though young dill pairs well with other crops. Once dill flowers, it cross-pollinates with carrots (they are in the same plant family, Apiaceae) and can produce bitter, unusable roots.
What Vegetables Should Never Be Planted Together?
Quick Answer: Fennel should not grow near almost any vegetable. Onions and beans inhibit each other. Brassicas like broccoli and cauliflower compete poorly with tomatoes and strawberries. These bad pairings reduce yields through chemical inhibition, shared disease risk, or resource competition.
Companion Planting Combinations to Always Avoid
| Plant | Avoid Planting Near | Why | Minimum Separation |
|---|---|---|---|
| Fennel | Tomatoes, peppers, beans, eggplant | Root exudates inhibit growth in most vegetable species | 3–4 feet; best grown in a container or isolation bed |
| Onion / Garlic | Beans, peas | Allicin compounds (sulfur-based chemicals in alliums) stunt legume root development | 24 inches minimum |
| Brassicas (broccoli, cabbage, cauliflower) | Tomatoes, strawberries, peppers | Compete for calcium; release glucosinolates that inhibit Solanaceae root systems | 24–36 inches |
| Potato | Tomatoes, cucumber, squash | Shares late blight pathogen (Phytophthora infestans); increases disease spread | 4–6 feet; use separate beds |
| Corn | Tomatoes | Attracts shared pest species (corn earworm / tomato fruitworm) | 6+ feet or separate garden sections |
Fennel deserves special attention. Most companion planting guides place it in a category of its own. It releases alelochemicals (growth-inhibiting compounds) from its roots that affect nearly every common vegetable. If you grow fennel, give it a container or an isolated corner of the garden, away from everything else.
How Do Herbs Work as Companion Plants for Vegetables?
Quick Answer: Herbs like basil, dill, cilantro, and rosemary are among the most effective companions for vegetables. They repel pests through scent, attract beneficial insects through flowers, and some improve the flavor of nearby vegetables when grown in close proximity.
Best Herb Companions and Their Functions
- Basil: Repels aphids, spider mites, and thrips. Best near tomatoes and peppers. Needs to remain leafy, not allowed to bolt (go to flower), for best pest-deterrent effect.
- Dill: Attracts hoverflies and parasitic wasps when flowering. Use young dill near brassicas. Keep mature dill away from carrots and fennel.
- Cilantro / Coriander: When allowed to flower, attracts predatory insects including lacewings. Effective near squash and beans.
- Rosemary: Strong scent confuses carrot fly and cabbage moths. Excellent near brassicas, carrots, and beans.
- Mint: Deters aphids, ants, and flea beetles. Plant in containers sunk into the soil to prevent aggressive spreading. Works near brassicas and tomatoes.
- Chamomile: Improves the growth of brassicas in documented field observations. Attracts hoverflies. Plant in small clusters throughout the bed rather than in rows.
What Is a Trap Crop and How Do You Use One?

Quick Answer: A trap crop is a sacrificial plant that pests prefer over your main crop. You plant it at the garden border to lure insects away from vegetables. Once heavily infested, you remove and destroy the trap crop to break the pest cycle before it spreads inward.
Nasturtiums are the most commonly used trap crop in home vegetable gardens. Aphids strongly prefer nasturtium leaves over most vegetables. Planting nasturtiums at the outer edge of a tomato, pepper, or bean bed draws aphid colonies away from the main plants.
The key is monitoring. Once you see heavy aphid clusters on nasturtiums, pull the entire plant, seal it in a bag, and dispose of it away from your compost pile. If you leave infested trap crops in place too long, the pest population grows large enough to overflow onto your main vegetables.
Blue Hubbard squash works as a trap crop for squash vine borers and cucumber beetles. Plant one Blue Hubbard at the perimeter of your squash bed. Borers prefer it over zucchini and summer squash, concentrating the infestation in one place you can manage.
Printable Companion Planting Chart for Common Vegetables
Quick Answer: This reference chart lists the best and worst companions for 10 common vegetables. Use it to plan bed layouts before planting season. Most companion effects work within 12 to 24 inches, so use this chart alongside a scaled bed map for accurate placement.
Companion Planting Quick Reference Chart
| Vegetable | Best Companions | Worst Companions | Key Benefit |
|---|---|---|---|
| Tomato | Basil, marigold, carrot, parsley, borage | Fennel, corn, brassicas, potato | Pest repellent, nematode control |
| Pepper | Basil, carrot, spinach, marigold | Fennel, brassicas | Aphid deterrence, moisture retention |
| Cucumber | Radish, nasturtium, dill (young), beans | Sage, potato | Beetle deterrence, nitrogen |
| Corn | Beans, squash, melon | Tomatoes, brassicas | Three Sisters nitrogen and ground cover |
| Beans | Corn, squash, carrot, cucumber | Onion, garlic, fennel | Nitrogen fixing for surrounding plants |
| Carrot | Onion, leek, rosemary, tomato | Dill (mature), parsnip, anise | Carrot fly prevention via scent masking |
| Lettuce | Carrot, radish, strawberry, tall herbs | Celery, parsley | Shade from tall neighbors keeps lettuce cool |
| Squash | Corn, beans, nasturtium, borage | Potato, fennel | Pollinator attraction, trap cropping |
| Brassicas | Dill, rosemary, chamomile, onion | Tomatoes, strawberry, pepper | Cabbage moth deterrence |
| Garlic | Tomatoes, peppers, roses, beets | Beans, peas | Fungal disease suppression, aphid deterrence |
How to Use This Chart When Designing Your Garden Bed
- List every vegetable you plan to grow this season.
- Check each vegetable’s worst companions against your full list. Remove any problematic pairings from the same bed.
- Identify which vegetables have overlapping good companions. Group those vegetables together to maximize the benefit of shared companion plants.
- Assign one or two companion herbs per bed section. Don’t fill every row with herbs or they compete for nutrients.
- Place trap crops like nasturtium at bed borders, not mixed into the interior rows.
- Draw a simple sketch with spacing, keeping companions within 12 to 24 inches of the plants they support.
Does Companion Planting Work Differently in Raised Beds vs. In-Ground Gardens?
Quick Answer: Companion planting works in both settings, but raised beds concentrate benefits faster because the smaller space keeps companion plants within effective range. In-ground gardens need wider spacing and larger companion plant clusters to achieve the same pest and soil benefits.
Raised beds give you precise control over what grows where. Since beds are typically 3 to 4 feet wide, any plant in the bed is within companion range of every other plant. This makes herb placement, trap cropping, and nitrogen fixing more efficient per square foot.
In-ground garden rows require you to plant companions in clusters of 3 to 5 plants rather than a single plant. One basil plant in a 20-foot tomato row won’t do much. But a cluster of 4 to 5 basil plants every 6 feet along the row creates a meaningful scent barrier that pests must navigate.
How Do Flowers Fit Into a Vegetable Companion Planting Strategy?
Quick Answer: Flowers like marigolds, nasturtiums, and borage serve active roles in vegetable gardens. They attract pollinators, host predatory insects, act as trap crops, and deter soil pests. Interplanting flowers throughout vegetable beds increases biodiversity and reduces pest pressure.
French marigolds (Tagetes patula) are the most researched flowering companion for vegetable gardens. Their roots release alpha-terthienyl, a compound that suppresses root-knot nematodes in the surrounding soil. One study from Rothamsted Research in the UK found that a full growing season of French marigolds significantly reduced nematode populations in treated plots.
Borage attracts bumblebees and improves pollination for squash, beans, and cucumber. It also contains small amounts of pyrrolizidine alkaloids in its leaves, which may deter some chewing insects. Borage self-seeds readily, so you may only need to plant it once.
Zinnias attract ladybugs, lacewings, and parasitic wasps that hunt aphids, caterpillars, and whiteflies. Plant zinnias at the corners of vegetable beds or in a short row alongside a heavy-feeding crop like corn or squash.
Frequently Asked Questions
Can I practice companion planting in containers?
Yes. Use large containers, at least 15 to 20 gallons, to pair plants without root competition. Tomatoes with basil, or peppers with spinach, both work well in the same large container. Avoid pairing fast-spreading plants like mint with vegetables in containers because mint will quickly dominate the root space.
How close do companion plants need to be to have an effect?
Most companion benefits work within 12 to 18 inches. Root-based effects like nitrogen fixing or nematode suppression require physical root contact or proximity in shared soil. Scent-based repellents work at slightly greater distances, up to 24 inches, depending on airflow in your garden.
Does marigold variety matter for companion planting?
Yes. French marigolds (Tagetes patula) are the variety with documented nematode-suppressing root compounds. African marigolds (Tagetes erecta) attract pollinators but offer less soil protection. For pest deterrence near tomatoes and peppers, choose French marigolds specifically.
Can companion planting replace pesticides entirely?
Companion planting reduces pest pressure but rarely eliminates it completely. Think of it as pest management support, not a standalone solution. In combination with crop rotation, physical barriers, and healthy soil, companion planting can significantly lower the need for pesticide intervention in most home gardens.
Is it too late to add companion plants after vegetables are already growing?
No. You can transplant or direct-sow most companion herbs and flowers into established beds. Basil, marigolds, nasturtiums, and dill can be added mid-season. Nitrogen-fixing companions like beans are most effective when planted at the same time as the crop they support, but adding them later still improves soil quality for future plantings.
Why does fennel need to be isolated from other vegetables?
Fennel releases allelopathic compounds (growth-inhibiting chemicals) from its roots and foliage that affect the germination and growth of most common vegetable species. Unlike other herbs that benefit or neutrally affect neighbors, fennel actively suppresses nearby plants. Grow fennel in a dedicated container or a section of the garden at least 3 to 4 feet from any vegetable bed.