How Companion Planting Works in Containers: A Practical Breakdown
This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. This helps us keep creating free content.
If you have spent any time reading gardening advice, you have encountered companion planting lists. Tomatoes love basil. Marigolds repel everything. Carrots and onions are best friends. These lists are repeated endlessly across gardening books, websites, and social media, often without much scrutiny about whether they actually work, and almost never with specific advice for container gardeners.
The truth is more nuanced than the lists suggest. Some companion planting combinations have genuine scientific support. Some are based on reasonable observation but lack rigorous evidence. And some are outright myths that have been repeated so many times they feel like facts. For container gardeners working with limited space, it is especially important to separate the useful from the wishful.
What Companion Planting Actually Means
At its core, companion planting is growing different plants near each other for mutual benefit. The benefits can come from several mechanisms, and understanding which mechanism is at work helps you evaluate whether a particular combination makes sense in containers.

Mechanism 1: Pest Confusion
Many pest insects find their target plants by smell. A monoculture, one type of plant growing alone, creates a strong scent signal that is easy for pests to locate. Mixed plantings dilute this signal. An aphid searching for your lettuce has a harder time finding it when the lettuce is surrounded by strongly scented herbs. This mechanism is well-supported by research and works in any setting, including containers.
Mechanism 2: Beneficial Insect Attraction
Some plants attract predatory insects that eat garden pests. Flowers in the daisy and umbellifer families (dill, fennel, yarrow) attract hoverflies and parasitic wasps that consume aphids. Including these plants near your vegetables increases the natural pest control in your garden. This works well on balconies because even a few flowering plants can attract beneficial insects.
Mechanism 3: Physical Support or Shade
Tall plants can shade heat-sensitive shorter plants. Climbing plants can use sturdy neighbors as living supports. In containers, this translates to practical combinations like tall tomato plants shading lettuce from afternoon sun, or beans climbing a corn stalk in a large pot.

Mechanism 4: Soil Chemistry
Legumes (beans, peas) fix nitrogen from the air into the soil through a symbiotic relationship with bacteria in their roots. This nitrogen becomes available to neighboring plants over time. In open gardens, this is a significant benefit. In containers, the effect is more limited because the soil volume is small and nitrogen can be supplied more efficiently through fertilizer.
Combinations That Genuinely Work in Containers
Bloem Terra Pot 16-Inch Resin Planter
8-gallon terracotta-look resin planter, UV-stable, frost-safe, 1/10 the weight of real terracotta.
See on Amazon βTomatoes and Basil
This is the most famous companion planting pair, and it is one of the few that holds up well under scrutiny. Basil's strong scent appears to confuse or deter some tomato pests, including whiteflies and aphids. Studies have shown reduced pest pressure on tomatoes grown with basil compared to tomatoes grown alone. In a container, planting basil around the base of a tomato plant in a large pot (at least 40 centimeters wide) gives you both pest benefits and the practical convenience of having two kitchen essentials in one container.
Lettuce Under Taller Plants
Lettuce bolts, runs to seed and turns bitter, in hot weather and strong sun. Growing lettuce in the shade of taller plants like tomatoes, peppers, or beans extends the lettuce harvest by weeks. This is not a chemical interaction but a practical one: the taller plant provides the cooler, shadier conditions that lettuce prefers. In containers, plant lettuce on the north side of a taller companion where it receives filtered light rather than direct afternoon sun.

Herbs Among Vegetables
Strongly scented herbs, basil, oregano, thyme, sage, rosemary, planted among or near vegetable containers create a confusing scent landscape that makes it harder for pest insects to locate their targets. This does not eliminate pests, but multiple studies show it reduces pest damage compared to growing vegetables alone. In a container garden, dispersing herb pots among your vegetable containers rather than grouping them separately gives you this benefit at no extra cost.
Marigolds (With a Caveat)
Marigolds are the most-cited companion plant in gardening literature. Their reputation is partially deserved: French marigolds (Tagetes patula) produce chemicals in their roots that suppress certain soil nematodes, and their strong scent can deter whiteflies. However, the nematode-suppressing effect requires growing marigolds in the same soil for an extended period, typically an entire season, before the effect is significant. In containers where you change soil regularly, this benefit is minimal.
The whitefly deterrent effect is more immediately useful. A pot of French marigolds placed near tomatoes or peppers can reduce whitefly pressure. They also attract hoverflies, which eat aphids. So while marigolds are not the miracle companion plant that gardening folklore suggests, they are genuinely useful, just not for the primary reason most people believe.
Popular Combinations That Are Mostly Myth
Carrots and Onions
The claim is that onions repel carrot fly and carrots repel onion fly. Research results are mixed at best, some studies show a slight reduction in pest pressure, others show none. In containers, where both plants are likely isolated from the ground-dwelling flies that attack them in open gardens, this combination is neither harmful nor particularly helpful. Grow them together if you want to, but do not expect pest-free crops because of it.

The "Three Sisters" in Containers
The Native American three sisters planting of corn, beans, and squash is a brilliant system for open ground. Corn supports beans, beans fix nitrogen for corn, and squash shades the soil. In containers, this combination is problematic. Corn needs deep, large containers and plenty of them for pollination. Squash is too vigorous for most balcony containers. The nitrogen-fixing benefit is negligible in fertilized container soil. Admire this system in the ground, but do not force it into pots.
Practical Container Companion Planting Chart
| Main Plant | Good Container Companions | Primary Benefit |
|---|---|---|
| Tomatoes | Basil, parsley, marigolds | Pest confusion, whitefly deterrent |
| Peppers | Basil, oregano, marigolds | Scent masking, beneficial insects |
| Lettuce | Tall herbs, tomatoes (for shade) | Sun protection, extended harvest |
| Beans | Summer savory, nasturtiums | Aphid deterrent, pest trap |
| Cucumbers | Dill, nasturtiums, radishes | Beneficial insects, space use |
| Strawberries | Thyme, borage, chives | Pollinator attraction, ground cover |
Plants That Should Not Share a Container
While many poor companion planting claims are exaggerated, some combinations genuinely cause problems in the confined space of a container.
- Mint with anything: Mint is aggressively invasive and will dominate any container it shares. Always give mint its own pot.
- Fennel with most vegetables: Fennel produces chemicals that inhibit the growth of many neighboring plants. Keep it isolated in its own container.
- Plants with different water needs: Rosemary (dry) and basil (moist) in the same container means one plant is always getting the wrong amount of water. This is the most practical reason to avoid certain combinations in containers, not chemistry, but incompatible care requirements.
A Balanced Perspective
Companion planting is neither gardening magic nor complete nonsense. The mechanisms behind it, pest confusion, beneficial insect attraction, physical interactions, are real and supported by science. But the specific claims in popular companion planting lists are often exaggerated, oversimplified, or based on garden-bed research that does not translate directly to containers.
Gardening is full of received wisdom that sounds authoritative but does not hold up under examination. The best balcony gardeners I know are the ones who experiment, observe what actually happens in their specific conditions, and adjust based on what they see, not what a list told them should happen. Your balcony is your laboratory. Plant combinations that interest you, watch closely, and let the results speak for themselves.
Published by the Garden Balcony editorial team. Published September 4, 2026.
Editorial responsibility: see Imprint.
Spotted an error or have something to add? corrections@gardenbalcony.com
Grow with Us
Seasonal planting guides, care tips, and small-space inspiration β every Sunday.
π Free bonus: Balcony Garden Starter Guide (PDF)
You might also like
Best Compact Vegetables for Tiny Balconies
Even the smallest balcony can produce real food. These compact vegetable varieties were bred specifically for containers and tight spaces β no sprawling vines or massive root systems required.
Growing Spinach Year-Round in Containers
Spinach is a cool-weather superstar that thrives in containers on balconies. With the right timing and variety choices, you can harvest fresh spinach nearly every month of the year.
Understanding Soil pH for Container Gardening
Soil pH quietly controls whether your plants can access nutrients β even if those nutrients are right there in the soil. Here is what every container gardener needs to know about pH and how to manage it.