Yes, you can plant tomatoes and cucumbers together, and they often grow well as neighbors
Tomatoes and cucumbers are compatible garden companions. They have different root depths, different nutrient needs, and they don't compete for the same space or sunlight in ways that harm either plant. Many gardeners plant them in the same bed or even in containers together without problems. The main thing to watch is that both plants need consistent water and good drainage—if you set up your watering and soil right for one, the other will thrive too.
That said, companion planting isn't magic. Growing them together won't make your tomatoes taste better or your cucumbers grow faster. What it does is let you use garden space efficiently and avoid the plants actively hurting each other. Both will do fine on their own, and both will do fine together. The real work is giving each plant what it needs: sun, water, soil nutrients, and room to grow.
Key Takeaways
- Tomatoes and cucumbers have different root systems—tomatoes go deep, cucumbers spread wide—so they don't compete underground for the same resources.
- Both plants need full sun and consistent moisture, so watering and soil conditions that work for one will work for the other.
- Space tomatoes 24 to 36 inches apart and cucumbers 12 inches apart (or 24 inches if they're vining types), so each has room to grow without crowding.
- Avoid planting them near fennel or potatoes, which can slow growth in both crops, but tomatoes and cucumbers themselves don't inhibit each other.
How their root systems work together
Tomato roots grow deep—they can reach 2 to 3 feet down into the soil, especially as the plant matures. Cucumber roots stay shallow and spread sideways, usually staying in the top 12 inches of soil. Because they're working in different soil layers, they're not fighting for the same water or nutrients. This is why they pair well: one plant is mining deep resources while the other is using the surface layer.
This difference also means you can plant them closer together than you might with two tomato plants or two cucumber plants. A tomato plant and a cucumber plant 18 to 24 inches apart will have room to grow without their root zones overlapping much. In a raised bed or large container, you can fit both without either one starving the other.
Spacing and layout in the garden bed
Give tomatoes 24 to 36 inches between plants, depending on the variety. Determinate types (bush tomatoes that stop growing at a set height) can be closer—24 inches works. Indeterminate types (vining tomatoes that keep growing all season) need 30 to 36 inches so air can move around the foliage and prevent disease.
Cucumbers need 12 inches between plants if they're bush varieties, or 24 inches if they're vining types that sprawl across the ground. If you're trellising your cucumbers (growing them up a stake or fence), you can plant them closer because they're growing up instead of out. A straightforward layout is to put a tomato plant in the center with cucumber plants around it, spaced so the cucumber vines can sprawl or climb without shading the tomato.
In containers, a 5-gallon bucket holds one tomato plant comfortably, or one cucumber plant. A larger container—20 gallons or more—can hold one tomato and one cucumber if you give the tomato the deeper space and let the cucumber spread across the surface or up a trellis.
Water and soil needs are nearly identical
Both plants want soil that drains well but holds moisture. Both need consistent watering—not soggy, not bone-dry. Tomatoes prefer soil with a pH between 6.0 and 6.8; cucumbers like 6.0 to 7.0. That overlap means you can amend one bed to suit both. Add compost or aged manure to improve drainage and nutrient content, and both plants will respond.
Water deeply and regularly, aiming for 1 to 2 inches per week depending on heat and rainfall. Mulch around both plants with 2 to 3 inches of straw or shredded leaves to keep soil temperature even and reduce water loss. Drip irrigation or soaker hoses work better than overhead watering because they keep foliage dry, which reduces fungal disease in both crops.
Fertilize every 2 to 3 weeks with a balanced fertilizer once the plants are established. Tomatoes benefit from extra phosphorus and potassium as they flower and fruit; cucumbers are less demanding but won't refuse it. A single feeding schedule works for both.
Plants to avoid planting near tomatoes or cucumbers
Fennel and potatoes are the main ones to keep away from both crops. Fennel releases compounds that slow growth in many plants, including tomatoes and cucumbers. Potatoes and tomatoes are both nightshades and share similar pests and diseases, so planting them together increases the risk of blight or pest damage to both.
Brassicas (cabbage, broccoli, kale) don't harm tomatoes or cucumbers, but they prefer cooler weather and different spacing, so they're awkward bed-mates in practice. Basil, parsley, and marigolds are often recommended as companions to tomatoes and won't hurt cucumbers either, so if you want to add a third plant to the bed, those are safe choices.
Common problems when growing them together
The main issue isn't the plants themselves—it's that both are prone to the same pests and diseases. Powdery mildew affects both. Spider mites and aphids will feed on both. If you get an outbreak of one pest, you'll need to treat both plants. This isn't a reason not to plant them together; it's just something to watch for. Check leaves weekly, especially the undersides, and spray with neem oil or insecticidal soap at the first sign of damage.
Overcrowding is the other risk. If you plant them too close or don't prune, the foliage gets dense, air doesn't move, and fungal diseases like powdery mildew and early blight take hold. Prune lower tomato leaves once the plant is established, and thin cucumber vines if they're tangling. Good air flow is more important than having maximum foliage.
When to plant them together
Both are warm-season crops. Plant them after the last frost date in your area, when soil temperature is at least 60°F (ideally 70°F or warmer). Tomatoes are slightly more cold-sensitive than cucumbers, so if you're planting early in the season, wait until soil is warm enough for tomatoes—usually 2 to 3 weeks after the last frost date. Cucumbers will germinate and grow faster in warm soil anyway, so planting them at the same time makes sense.
You can succession-plant cucumbers every 2 to 3 weeks through early summer to get a continuous harvest, while tomatoes go in once and produce all season. If you're doing that, plant new cucumber seeds in a different spot in the bed to avoid disturbing the tomato roots.
Frequently Asked Questions
Do tomatoes and cucumbers compete for nutrients?
Not significantly. Tomatoes are heavier feeders and pull more nitrogen, but cucumbers don't need as much. A single balanced fertilizer schedule every 2 to 3 weeks supports both. If you're growing in poor soil, amend it well before planting and both will have what they need.
Can I grow them in the same container?
Yes, in a large container—20 gallons or more. Plant the tomato in the center where it can grow deep, and let the cucumber vine around the edge or up a trellis. Use quality potting soil, water consistently, and fertilize every 2 weeks. A 5-gallon bucket is too small for both.
Will cucumber vines shade out my tomato plant?
Only if you let them sprawl over the tomato. Trellis the cucumbers vertically or plant them on the north side of the tomato so they don't cast shade. Both plants need 6 to 8 hours of direct sun daily, so plan your layout to give each one its own light.
What if I see powdery mildew on one plant?
Treat both plants when ready, even if only one shows symptoms. Spray with neem oil or a sulfur-based fungicide every 7 to 10 days until the mildew clears. Improve air flow by pruning lower leaves and thinning dense growth. Powdery mildew spreads fast in humid, crowded conditions.
Can I plant them at different times?
Yes. Tomatoes go in once and produce all season. You can plant cucumbers 2 to 3 weeks after tomatoes, or succession-plant new cucumber seeds every 2 to 3 weeks for continuous harvest. Just plant new seeds in a different spot to avoid disturbing tomato roots.