Overview

Companion planting is the practice of placing plants together that benefit each other — and keeping apart plants that do not get along. garden.gg includes a comprehensive companion planting database with over 100 plant combinations, visual indicators in the grid layout, and automatic compatibility warnings to help you build healthier, more productive plots.

What is Companion Planting?

Plants interact with each other in meaningful ways. Some relationships are beneficial: one plant repels pests that attack its neighbor, fixes nitrogen in the soil for hungry feeders, or provides physical support. Other relationships are harmful: plants compete aggressively for the same nutrients, attract each other’s pests, or release chemicals that inhibit nearby growth.

Companion planting is the strategic use of these relationships to improve garden outcomes without additional inputs like pesticides or synthetic fertilizers.

Types of Beneficial Relationships

Understanding why plants are companions helps you make better planting decisions:

Pest Deterrent

Some plants repel insects that attack their neighbors. The aromatic compounds in their leaves, flowers, or roots create a natural barrier.

Examples:

  • Basil near tomatoes: Repels aphids, mosquitoes, and whiteflies
  • Marigolds near vegetables: The scent deters many common garden pests
  • Rosemary near brassicas: Repels cabbage moth and carrot fly
  • Garlic near roses: Deters aphids and Japanese beetles

Nitrogen Fixing

Legumes (beans, peas, clover) host bacteria in their root nodules that convert atmospheric nitrogen into a form plants can use. Planting nitrogen-hungry crops near legumes gives them access to this natural fertilizer.

Examples:

  • Beans near corn: Beans fix nitrogen that corn needs in quantity
  • Peas near leafy greens: Lettuce and spinach benefit from the nitrogen
  • Clover as ground cover: Fixes nitrogen for the entire bed

Shade Provision

Tall plants can provide beneficial shade for crops that prefer cooler conditions or burn in direct afternoon sun.

Examples:

  • Corn shading lettuce: Lettuce bolts in heat; corn provides afternoon shade
  • Sunflowers shading spinach: Prevents premature bolting
  • Tomato cages shading basil: Partial shade keeps basil from flowering too quickly

Pollinator Attraction

Flowering plants attract bees and other pollinators that improve fruit set on nearby crops.

Examples:

  • Borage near squash: Attracts bees for improved pollination
  • Lavender near any garden bed: Draws pollinators from a wide radius
  • Zinnias near vegetable gardens: Beautiful and functional pollinator magnets

Physical Support

Some plants provide physical structure for climbing neighbors.

Examples:

  • Corn as support for beans: The bean vines climb the corn stalks
  • Sunflowers as support for cucumbers: Strong stems support lightweight vines

Trap Cropping

Sacrificial plants that attract pests away from your main crops.

Examples:

  • Nasturtiums near brassicas: Attract aphids away from cabbage and kale
  • Blue Hubbard squash near other squash: Attracts squash bugs preferentially
  • Radishes near cucumbers: Attract flea beetles away from cucumber seedlings

Harmful Relationships

Some plants should be kept apart:

Allelopathy

Certain plants release chemicals that inhibit the growth of nearby plants. This is a natural competitive strategy.

Examples:

  • Black walnut trees: Produce juglone, toxic to tomatoes, potatoes, and many garden plants
  • Fennel: Inhibits most garden vegetables — grow it in a separate container
  • Sunflowers: Release compounds that can inhibit seed germination nearby

Nutrient Competition

Plants with similar nutrient needs planted in close proximity compete for the same resources, reducing yields for both.

Examples:

  • Two heavy feeders side by side: Tomatoes next to corn both demand high nitrogen
  • Root crops competing: Carrots and potatoes in the same space fight for the same soil zone

Pest Attraction

Some combinations attract more pests than either plant alone.

Examples:

  • Dill near carrots: Both attract carrot rust fly; together they create a stronger attractant
  • Potatoes near tomatoes: Both are solanaceous and attract the same diseases (blight)

The Companion Planting Database

garden.gg includes a curated database of over 100 plant companion relationships. Each entry specifies:

  • Plant A and Plant B: The two plants in the relationship
  • Relationship: Good (beneficial), Bad (harmful), or Neutral
  • Benefit type: Why they help (pest deterrent, nitrogen fixing, shade, pollinator, support)
  • Notes: Specific details about the interaction

Browsing the Database

Access the companion planting database from Garden > Companion Guide or from the search bar. You can:

  • Search by plant: Enter a plant name to see all its companions and antagonists
  • Filter by relationship: Show only good, only bad, or all combinations
  • Filter by benefit type: Show only pest deterrent relationships, only nitrogen fixers, etc.

Example Database Entries

Here is a sample of what the database contains for tomatoes:

Companion PlantRelationshipBenefitNotes
BasilGoodPest deterrentRepels aphids and whiteflies, may improve flavor
MarigoldGoodPest deterrentRepels nematodes and whiteflies
CarrotGoodSpace optimizationCarrots grow below tomato canopy, loosening soil
ParsleyGoodPest deterrentAttracts beneficial insects that prey on tomato pests
BorageGoodPollinator attractionDraws bees, may improve tomato fruit set
AsparagusGoodPest deterrentTomatoes repel asparagus beetle
CabbageBadNutrient competitionBoth are heavy feeders, tomatoes stunt brassica growth
FennelBadAllelopathyFennel inhibits tomato growth
PotatoBadDisease sharingBoth susceptible to blight; proximity increases risk
CornBadShared pestBoth attract tomato hornworm/corn earworm
DillNeutralMature dill may slightly inhibit tomato growth

Plot Compatibility Check

When you add a plant to a plot, garden.gg automatically checks the companion planting database against all existing plants in that plot.

How the Check Works

  1. You select a plant to add to a plot
  2. garden.gg looks up all companion relationships for that plant
  3. It compares against every plant already in the plot
  4. Results are displayed before you confirm the addition

Warning Display

If an incompatible plant is detected, you see a warning:

  • Red warning: “Cherokee Purple Tomato is a bad companion for Fennel. Fennel inhibits tomato growth through allelopathy.”
  • Yellow notice: “No known companion data for this combination.”

Warnings are advisory — garden.gg does not prevent you from adding the plant. You may have reasons to override the recommendation (different sections of a large plot, experimenting, etc.).

Recommendations

If you ask “What should I plant next to my tomatoes?”, the companion guide shows all good companions ranked by benefit type. This is especially useful when planning a new bed and deciding which crops to group together.

Visual Indicators in the Grid Layout

The grid layout uses color-coded borders and icons to show companion relationships at a glance.

Color Coding

When viewing your plot grid:

  • Green border/glow: This plant has a beneficial companion relationship with an adjacent plant. Hover to see which neighbor and why.
  • Red border/glow: This plant has a harmful relationship with an adjacent plant. Hover to see the warning.
  • Gray border: Neutral — no known companion relationship with adjacent plants.

Understanding the Indicators

The indicators only consider plants in adjacent grid cells (directly next to, above, below, or diagonal). Plants on opposite sides of a large plot may not interact significantly, so only proximity relationships are highlighted.

Grid Planning Workflow

Use the visual indicators to optimize your layout:

  1. Place your primary crops on the grid (tomatoes, peppers, etc.)
  2. Look for red borders — these indicate bad neighbor placements
  3. Rearrange to eliminate red indicators
  4. Fill gaps with companion plants (basil, marigolds, herbs)
  5. Look for green indicators confirming good placements
  6. Review the overall layout before planting

The Three Sisters: A Classic Example

The Three Sisters planting method is the most famous example of companion planting, developed by Indigenous peoples of North America. It demonstrates how three plants work together in a mutually beneficial system.

The Plants

PlantRoleBenefit to the Group
CornStructureProvides a tall stalk for beans to climb
BeansNitrogen fixerFixes atmospheric nitrogen in the soil, feeding the corn
SquashGround coverLarge leaves shade the soil, retaining moisture and suppressing weeds

How to Plant Three Sisters in garden.gg

  1. Create a plot (in-ground or raised bed, at least 4x4 feet)
  2. Add corn in the center cells of the grid
  3. Add beans in cells adjacent to corn
  4. Add squash in outer cells where leaves can spread
  5. The grid will show green companion indicators between all three plants

Why It Works

Each plant contributes something the others need:

  • Corn gets nitrogen from beans and weed suppression from squash
  • Beans get a climbing structure from corn and moisture retention from squash
  • Squash gets nitrogen from beans and its vines use the understory space that corn and beans leave open

This is companion planting at its best: three plants growing together produce more than three plants growing separately.

Planning with the Planting Calendar

Companion planting works best when combined with your zone-based planting calendar. Not all companions can be planted at the same time.

Timing Companion Groups

Some companion groups plant simultaneously:

  • Tomatoes + basil: Both go out after last frost
  • Beans + corn + squash: Three Sisters are planted together

Other companions stagger:

  • Peas + lettuce: Peas go in early spring; lettuce is interplanted as peas mature
  • Garlic + tomatoes: Garlic is planted in fall; tomatoes go in the following spring next to established garlic

Using the Calendar

The planting calendar in garden.gg shows:

  • Recommended planting windows for your hardiness zone
  • Visual overlap between companion plants, highlighting groups that can be planted together
  • Succession planting opportunities within companion groups
  • Frost date warnings that affect planting timing

Seasonal Companion Rotations

Some companion relationships work across seasons:

SeasonPrimary CropCompanionNotes
SpringPeasLettucePeas provide nitrogen and light shade
SummerTomatoesBasilClassic companion, plant after last frost
FallBrassicasGarlicGarlic deters cabbage pests
WinterCover cropsCrimson clover fixes nitrogen for spring crops

Building Your Companion Knowledge

Start Simple

Begin with well-established companion pairs:

  1. Tomatoes + Basil: The most popular and well-documented companion pair
  2. Carrots + Onions: Each repels the other’s primary pest (carrot fly and onion fly)
  3. Lettuce + Radishes: Radishes mature quickly and are harvested before lettuce needs the space
  4. Corn + Beans: Classic nitrogen-fixing partnership

Experiment and Record

Use garden.gg to test companion planting theories in your own garden:

  1. Plant the same variety in two plots — one with companions, one without
  2. Log events consistently for both
  3. Compare harvest yields, pest pressure, and plant health
  4. Use notes to record observations about companion interactions

Over time, your garden.gg data becomes your personal companion planting evidence base, tailored to your specific growing conditions.

Community Learning

Browse public gardens to see how other gardeners use companion planting. Look for gardens in your hardiness zone for the most relevant examples.

API Reference

Get Companions for a Plant

GET /api/v1/companions?plant_type=tomato

Response:

{
  "plant_type": "tomato",
  "companions": [
    {
      "companion": "basil",
      "relationship": "good",
      "benefit_type": "pest_deterrent",
      "notes": "Repels aphids and whiteflies. May improve tomato flavor."
    },
    {
      "companion": "fennel",
      "relationship": "bad",
      "benefit_type": null,
      "notes": "Fennel inhibits tomato growth through allelopathic compounds."
    }
  ]
}

Check Plot Compatibility

GET /api/v1/plots/{plot_id}/compatibility?new_plant_type=tomato

Next Steps