Companion plants that grow well with tomatoes
The best plants to grow next to tomatoes are ones that either improve soil nutrients, repel pests that attack tomatoes, or use space efficiently without competing for water and light. Basil is the most reliable choice—it repels spider mites and whiteflies while improving tomato flavor, and both plants thrive in the same warm conditions. Carrots grow shallow roots that don't compete with tomato roots, and they loosen soil as they grow. Marigolds deter nematodes (microscopic pests that damage roots) and many above-ground insects.
Parsley, cilantro, and chives attract beneficial insects that prey on tomato pests, and they take up minimal space. Borage flowers attract pollinators and deter hornworms. Nasturtiums act as a trap crop—pests prefer them to tomatoes, so they draw insects away from your main plant. Garlic and onions repel spider mites and some fungal diseases, though they should be planted at least a foot away so they don't shade the tomato base.
Key Takeaways
- Basil, marigolds, and carrots are the easiest companion plants because they repel common tomato pests and don't compete for nutrients or water.
- Herbs like parsley and chives attract beneficial insects that eat tomato pests, reducing the need for sprays.
- Nasturtiums and borage draw pests away from tomatoes by being more attractive to insects, protecting your harvest.
- Space garlic and onions at least one foot away from tomato stems so they don't block sunlight from reaching lower leaves.
- Plant companions at the same time as tomatoes or a few weeks before so they're established when tomatoes need protection most.
Plants that improve soil and reduce disease
Legumes—beans and peas—add nitrogen to soil as they grow, which tomatoes need heavily. Plant them in the same bed in previous seasons or interplant them if space allows, though they may shade tomato lower leaves if planted too close. Comfrey has deep roots that pull nutrients from far below the surface and bring them to the top layer where tomatoes feed; cut the leaves and lay them around the tomato base as mulch.
Buckwheat and clover are cover crops that improve soil structure and add organic matter. Plant them in fall after tomatoes finish, or in spring before you plant tomatoes, then turn them into the soil. Fennel is controversial—it helps some gardeners but inhibits growth in others, so test it in a small area first. Avoid planting fennel directly against the tomato stem; give it at least two feet of distance.
Plants to keep away from tomatoes
Some plants actively harm tomato growth or attract the same pests. Brassicas (cabbage, broccoli, kale) compete heavily for nitrogen and attract some of the same insects. Fennel releases compounds that slow tomato growth in many soils. Potatoes and peppers are in the same family as tomatoes and share the same diseases—early blight and late blight spread easily between them, so keep them in separate beds or at least six feet apart.
Corn shades tomatoes and attracts hornworms, which also eat tomato leaves. Dill attracts hornworms directly. Walnut trees release a chemical called juglone that poisons tomatoes and most other plants; if you have a walnut on your property, plant tomatoes at least 50 feet away. Avoid planting tomatoes near beets, which compete for the same nutrients and can stunt both plants.
Spacing and layout for companion planting
Tomatoes need full sun (at least six to eight hours daily) and good air circulation to prevent fungal disease. Plant companions where they won't shade the tomato plant or block airflow around the stem and lower leaves. Basil, parsley, and chives can go directly at the base of the tomato or in the same pot if you're container gardening. Carrots and onions should be planted in rows or clusters nearby but not touching the tomato stem.
Taller companions like borage (which grows two to three feet high) should go on the north side of tomatoes so they don't cast afternoon shade. Nasturtiums can be planted around the perimeter of the bed or in containers nearby. If you're planting in rows, space tomatoes four to five feet apart and put companion plants in the gaps or along the edges. In containers, a five-gallon pot holds one tomato plant and one or two small herbs; larger containers (ten gallons or more) can hold a tomato with basil, parsley, and a trailing nasturtium.
When to plant companions relative to tomatoes
Plant fast-growing herbs like basil and cilantro at the same time as tomato transplants, or wait until tomatoes are established (two to three weeks after planting) and the soil has warmed. Basil especially needs warm soil and will rot if planted too early in spring. Carrots and root vegetables should go in two to three weeks before tomatoes so they have a head start; tomato roots grow downward and won't interfere with carrots already established.
Marigolds and nasturtiums can be direct-seeded or transplanted at the same time as tomatoes. Garlic and onions are planted in fall (September to November in most regions) and will be ready to support tomatoes the following spring. If you're planting in late spring or summer, buy small onion sets rather than seeds so they mature before frost. Borage can be seeded directly into the soil two weeks before tomatoes; it germinates quickly and will be flowering by the time tomatoes need pest protection.
Container gardening with tomato companions
Container gardening limits space, so choose one or two companions rather than many. A single tomato plant in a five-gallon pot pairs well with basil in the same container—basil's shallow roots won't compete, and both prefer the same watering schedule. In a ten-gallon container, you can grow a tomato with basil, parsley, and a trailing nasturtium around the edge. In a large raised bed (four feet by eight feet), plant three to four tomatoes with basil at each base, marigolds in the corners, and carrots in the remaining space.
Container soil drains faster than garden soil, so companions that prefer drier conditions (like garlic) aren't ideal in pots. Stick with herbs and shallow-rooted plants. Water the entire container when the top inch of soil is dry; both tomatoes and their companions will need consistent moisture. Fertilize every two to three weeks with a balanced fertilizer (equal nitrogen, phosphorus, and potassium) because container soil loses nutrients faster than garden beds.
Frequently Asked Questions
Can I plant basil and tomatoes in the same pot?
Yes. Both need warm soil, full sun, and consistent moisture. Plant basil around the edge of a five-gallon pot with one tomato in the center, or use a larger container if you want more basil. Basil's roots stay shallow and won't compete with the tomato's deeper root system. Pinch basil flowers to encourage leaf growth and keep the plant bushy.
Will marigolds really keep pests away from tomatoes?
Marigolds reduce nematode populations in soil over time and deter some above-ground insects, but they won't eliminate pests completely. They work best as part of a larger strategy that includes removing diseased leaves, spacing plants for airflow, and watering at the soil level rather than overhead. Plant them throughout the bed rather than in one cluster.
How far should I keep potatoes away from tomatoes?
Plant potatoes at least six feet away, or in a separate bed entirely. Both are in the nightshade family and share early blight and late blight diseases. If one plant gets sick, the disease can spread to the other through soil splash or contaminated tools. Rotate these crops to different beds each year.
What if I don't have space for companion plants?
Basil and parsley are the highest-impact companions and take minimal space—even a small pot next to a tomato plant helps. If space is very limited, focus on removing diseased leaves promptly, watering at soil level, and spacing tomatoes far enough apart for airflow. These practices prevent many pest and disease problems without needing companion plants.
Can I plant tomatoes with lettuce or spinach?
Yes, but only in spring or fall when temperatures stay below 75°F. Lettuce and spinach bolt (go to seed) in heat, and tomatoes need warmth to thrive, so they have conflicting season needs. In cooler climates with long springs, you can plant lettuce around young tomatoes early in the season, then remove it once temperatures rise and tomatoes need more space.