Plant basil, carrots, and marigolds near tomatoes to improve growth and reduce pests

Tomatoes grow better when certain plants are nearby. Companion planting — placing specific plants close together — can boost your tomato yield, deter insects that damage fruit, and use garden space more efficiently. The plants that work best with tomatoes either repel common pests, attract beneficial insects, or use different soil nutrients so they do not compete.

The most reliable companions are basil, which repels spider mites and whiteflies; carrots, which do not compete for the same nutrients; and marigolds, which deter nematodes in the soil. Onions and garlic also work well because they repel aphids and spider mites. Parsley attracts hoverflies, which eat aphids. These plants can be planted in the same bed or in containers nearby.

Key Takeaways

  • Basil planted within 12 inches of tomato stems repels spider mites and whiteflies and improves tomato flavor.
  • Marigolds reduce root-knot nematodes in soil, a common pest that damages tomato roots.
  • Carrots, onions, and garlic do not compete with tomatoes for nutrients and actively repel harmful insects.
  • Parsley and borage attract hoverflies and bees, which pollinate flowers and eat aphids.
  • Avoid planting brassicas (cabbage, broccoli) and fennel near tomatoes, as they inhibit growth.

Herbs that protect tomatoes from insects

Basil is the strongest herb companion for tomatoes. Plant it directly beside tomato stems, within 12 inches if possible. Basil releases compounds that repel spider mites, whiteflies, and some beetles. The proximity also improves tomato flavor — some gardeners report sweeter fruit when basil grows nearby. Basil needs the same watering schedule as tomatoes, so they are practical to pair in the same bed.

Parsley attracts hoverflies, also called flower flies, which lay eggs near aphid colonies. The larvae eat dozens of aphids before maturing. Plant parsley around the base of tomato plants or in clusters between rows. Unlike basil, parsley tolerates partial shade, so it works in spots where tomato foliage creates dappled light.

Borage flowers attract bees and hoverflies. It grows tall and sprawling, so plant it at the edge of the tomato bed rather than directly underneath. Borage also accumulates potassium and calcium in its leaves; when the plant dies back, you can chop it into the soil to add those nutrients.

Vegetables and roots that grow well alongside tomatoes

Carrots are one of the safest companions because their roots grow shallow and do not compete with tomato roots, which go deeper. Carrots also do not attract the same pests as tomatoes. Plant carrot seeds directly in the soil between tomato plants or in rows 6 to 8 inches apart. Carrots take 60 to 80 days to mature, so you can harvest them before or after the tomato season ends.

Onions and garlic repel aphids, spider mites, and some beetles through sulfur compounds in their bulbs. Plant onion sets or garlic cloves in autumn or early spring, 4 to 6 inches from tomato stems. They mature slowly and do not shade the tomato plant. Garlic is especially useful because it also repels Japanese beetles.

Lettuce and spinach grow in the shade created by tomato foliage, making them space-efficient choices. Both are shallow-rooted and do not compete for water or nutrients. Plant them in spring before temperatures rise, or in late summer for a fall crop. They will be ready to harvest before tomato plants reach full size.

Flowers that reduce soil pests and attract pollinators

Marigolds are the most widely recommended flower for tomato beds because they reduce root-knot nematodes, microscopic pests that live in soil and damage tomato roots. Plant marigolds throughout the bed, not just at the edges. They bloom continuously from early summer through frost and require minimal water once established. Marigolds also attract pollinators and some beneficial wasps.

Nasturtiums act as a trap crop — pests prefer them to tomatoes, so they draw insects away from your fruit. Plant nasturtiums around the perimeter of the tomato bed. They tolerate poor soil and actually produce better flowers when soil is lean, so they do not compete for nutrients. Nasturtiums also attract hoverflies.

Calendula (pot marigold) attracts beneficial insects and repels some beetles. Unlike French marigolds, calendula tolerates cooler weather and partial shade. Plant it in clusters of three or four around the tomato bed.

Plants to keep away from tomatoes

Brassicas — cabbage, broccoli, cauliflower, and kale — inhibit tomato growth through root secretions. Do not plant them in the same bed or within 3 feet of tomato stems. Fennel also inhibits tomato growth and should be kept separate. Potatoes are susceptible to the same diseases as tomatoes, particularly early blight and late blight, so planting them together increases the risk that disease spreads between plants.

Corn and tomatoes compete for nitrogen and attract similar pests, so keep them at least 4 feet apart. Dill can inhibit tomato growth if planted too close, though it is safe at the edge of the garden. Walnut trees release juglone, a chemical that is toxic to tomatoes and many other plants — avoid planting tomatoes within 50 feet of a walnut.

How to arrange companion plants in your tomato bed

Space basil 12 inches from tomato stems and marigolds 18 inches away. Carrots and onions can be planted in rows between tomato plants, 6 to 8 inches apart. Parsley and borage work best at the edges or corners of the bed where they do not shade the tomato foliage. If you are using containers, plant basil in the same pot as a single tomato plant, or place a separate basil pot directly beside it.

Plant herbs and flowers at the same time as tomatoes in spring, or add them after tomatoes are established. Carrots and onions can go in earlier in the season. Lettuce and spinach are best planted in spring for an early harvest, or in late summer for fall crops. Water all plants on the same schedule — most companions prefer the same moisture level as tomatoes.

Rotate your companion plants each year. If you plant tomatoes in the same bed annually, alternate which herbs and flowers you use to prevent soil depletion and reduce pest buildup. Marigolds are safe to plant in the same spot year after year.

Frequently Asked Questions

Can I plant basil and tomatoes in the same container?

Yes. Use a container at least 5 gallons for one tomato plant and one basil plant. Basil needs less root space than tomato, so it will not compete. Water when the top inch of soil is dry. Both plants prefer full sun and warm temperatures, so they thrive in the same conditions.

Do companion plants actually increase tomato yield?

Companion plants reduce pest damage and improve pollination, which can increase yield. The effect is most noticeable with marigolds (reducing nematodes) and basil (repelling spider mites). Results vary by climate, soil, and which pests are present in your garden. They are worth trying, but are not a substitute for watering, fertilizing, and pruning.

What if I do not have space for companion plants?

Companion planting helps but is not required for tomatoes to grow. If space is limited, focus on basil and marigolds, which have the strongest effect. You can also plant companions in separate containers near your tomato plants.

Can I plant tomatoes near herbs like oregano and thyme?

Yes. Oregano and thyme do not inhibit tomato growth and attract pollinators. They are less effective at repelling pests than basil or parsley, but they are safe companions and useful for cooking.

When should I plant companion plants if I am starting tomatoes from seed indoors?

Start basil indoors at the same time as tomatoes so they are ready to transplant together. Plant carrots, onions, and marigold seeds directly in the garden bed after the last frost date, when soil is warm enough. Parsley can be started indoors or direct-seeded outdoors.