Companion planting is the practice of growing different plants in deliberate proximity so that each benefits the other. It is one of the oldest techniques in agriculture, documented in indigenous traditions across every continent, and one of the most practical tools available to home gardeners who want to get more from the same amount of space.
The benefits work through several mechanisms. Some plants repel insects that would otherwise damage neighbors. Some attract beneficial insects that control pest populations. Some fix nitrogen from the air into the soil in forms that neighboring plants can use. Some provide shade, wind protection, or a physical structure that benefits shorter plants nearby. And some simply do not compete, allowing two or more crops to share space more productively than either could alone.
This guide covers the most practical and well-supported companion planting combinations, the science behind why they work, and the pairings to avoid. It is organized around the most common vegetables in a home or homestead garden.
The Science Behind Companion Planting
Companion planting is not folklore dressed up as gardening advice. Several of its core mechanisms have been studied and confirmed by agricultural researchers. A review published by the Rodale Institute, one of the leading research organizations in organic agriculture, found that intercropping systems consistently outperformed monocultures in total yield per unit area, particularly in small-scale and organic growing contexts.
The three primary mechanisms are:
• Allelopathy: Some plants release chemical compounds from their roots or leaves that suppress the growth of other plants or inhibit pest and pathogen activity. Marigolds, for example, produce alpha-terthienyl, a compound that suppresses root-knot nematodes in surrounding soil
• Nitrogen fixation: Legumes including beans, peas, and clover form symbiotic relationships with Rhizobium bacteria that convert atmospheric nitrogen into plant-available forms. Neighboring plants that are heavy nitrogen feeders benefit directly
• Habitat provision and predator attraction: Certain flowering plants attract parasitic wasps, hoverflies, and other beneficial insects that prey on aphids, caterpillars, and other garden pests. Dill, fennel, yarrow, and members of the carrot family are especially effective in this role
Tomatoes
Tomatoes are heavy feeders that benefit enormously from the right companions and suffer from the wrong ones.
Good companions for tomatoes
• Basil: The most widely cited tomato companion. Some evidence suggests basil may repel aphids and whiteflies, and the two crops share similar water and light requirements. They also grow well in the same container, making this pairing useful for raised bed gardening setups where space is managed deliberately
• Marigolds (Tagetes species): Plant densely around tomato beds. French marigolds specifically produce root exudates that suppress nematodes. They also deter aphids and attract hoverflies whose larvae eat aphids
• Carrots: Loosen the soil around tomato roots as they grow, improving drainage and aeration without competing significantly for nutrients
• Borage: Repels tomato hornworm and attracts pollinators. Also accumulates calcium and potassium in its leaves, which return to the soil as it decomposes
• Garlic: Planted at the base of tomatoes, deters spider mites and aphids through volatile sulfur compounds
Bad companions for tomatoes
• Fennel: Allelopathic toward most vegetables including tomatoes. Keep it well away from the main garden or in a dedicated bed
• Brassicas (cabbage, broccoli, kale): Compete heavily for the same nutrients and can stunt each other’s growth
• Corn: Both attract the same pest species, particularly corn earworm and tomato fruitworm, which are the same insect at different life stages
Squash, Cucumbers, and Zucchini
Cucurbits are sprawling, heavy-feeding crops that do well with companions that do not compete for space at ground level.
• Corn and beans (the Three Sisters): The classic Native American intercropping system. Corn provides a trellis for beans; beans fix nitrogen; squash shades the ground, retaining moisture and suppressing weeds. The combination outperforms any of the three grown alone in terms of total caloric yield per acre, according to research published in the Journal of Sustainable Agriculture. The system adapts well to large raised beds
• Nasturtiums: Act as a trap crop for aphids, drawing them away from the main plants. Also edible
• Radishes: Planted at the base of cucumbers, deter cucumber beetles
• Dill and parsley: Attract parasitic wasps that prey on squash vine borers
Brassicas (Cabbage, Broccoli, Kale, Brussels Sprouts)
Brassicas are among the most pest-prone vegetables in the garden. Good companion planting is more important here than almost anywhere else.
• Dill: Attracts wasps and hoverflies that parasitize cabbage worms. Let it flower for maximum effect
• Nasturtiums: Trap crop for aphids. Plant at the bed edges
• Celery: Repels cabbage white butterfly when planted nearby
• Aromatic herbs (thyme, rosemary, sage, mint): The volatile oils in these plants confuse and deter the insects that seek brassicas by scent
• Marigolds: General pest deterrent; effective perimeter planting for any brassica bed
Avoid planting brassicas near tomatoes, strawberries, or pole beans.
Beans and Peas
Legumes are among the most valuable companions in any garden because of their nitrogen-fixing ability. Plant them near heavy feeders: corn, tomatoes, squash, and leafy greens all benefit from the nitrogen released into surrounding soil as legume roots decompose.
• Carrots: Share space efficiently with beans; roots occupy different soil depths
• Summer savory: Traditional companion for beans; reportedly deters bean beetles
• Squash: Works within the Three Sisters system
Avoid planting beans near onions, garlic, or other alliums. The sulfur compounds that make alliums useful as pest deterrents for some plants actively inhibit bean growth.
Carrots and Root Vegetables
• Leeks: Leeks deter carrot fly; carrots deter leek moth. A classic mutual-benefit pairing
• Rosemary and sage: Aromatic compounds deter carrot fly
• Onions: Planted in alternating rows with carrots, confuse the pest insects that target each
• Tomatoes: Loosen the same soil layer that carrot roots occupy, improving drainage
Avoid planting carrots near dill or parsley once either has flowered, as cross-pollination can occur between plants in the carrot family and may affect seed quality if you are saving seed.
Using Companion Planting in a Structured Garden Layout
Companion planting works best when it is planned rather than improvised. Before planting season, sketch your bed layout with companion relationships in mind. A few practical principles:
• Plant tall companions on the north or east side of shorter plants so they provide afternoon shade without blocking morning sun
• Use bed edges for trap crops and pest-deterring flowers so the main crop occupies the center of the bed
• Rotate companion groupings with the main crops each season to prevent pest and pathogen buildup in specific bed areas
• In intensive growing systems like, where beds are densely planted and soil quality is managed carefully, companion planting multiplies the benefit of every square foot by reducing pest pressure and improving soil nitrogen without adding external inputs
For reference, the University of California Cooperative Extension maintains a regularly updated guide to companion planting research organized by crop that is one of the more reliable institutional sources on which combinations have documented evidence behind them versus which are primarily traditional.
What Companion Planting Cannot Do
Companion planting is a useful tool, not a complete pest management system. It reduces pest pressure and improves growing conditions, but it does not eliminate pests or compensate for poor soil, inadequate water, or incorrect plant spacing.
Use it alongside good soil management, appropriate variety selection for your climate, and consistent monitoring. A garden where companion planting is one layer of a well-managed system will outperform a garden where it is the only layer.