Plastic boxes, either those meant for use as planters or sturdy storage totes, provide the necessary depth for carrots. Boxes made from untreated wood will also work. Avoid treated wood because the chemicals in the wood may leech into the soil and taint the carrots. Use boxes 12 to 14 inches deep so the carrots have room to develop their long roots. Drill holes in the bottom of the box if the box doesn't already have bottom drainage holes. Space 1/4-inch diameter holes every 2 to 4 inches apart. The holes allow excess moisture to drain from the box so the carrots don't rot in waterlogged soil.
You can grow any type of carrot in a box. Shorter varieties grow well in shallower boxes, while long-rooted types, like Nantes, require a deeper box. Carrot variety also affects the necessary spacing and how many carrot plants will fit in the box. Avoid dwarf types that produce radish-shaped, orb-like roots as these require more space between plants so you can't fit as many carrots into a small box.
Box-grown carrots require quality soil and proper fertilization since they don't have access to the natural nutrients available to garden-grown carrots. Use a lightweight potting soil or soilless planting medium. Add a slow-release balanced fertilizer to the soil before you plant the carrots. The amount of fertilizer depends on the size of your box, so refer to the fertilizer label for recommendations. The carrots benefit from light applications of soluble fertilizer every two weeks beginning eight weeks after planting.
Box-grown carrots require minimal maintenance. Weeds rarely pose a problem in the box if you use new potting soil. The soil in the box may dry out more quickly than a garden bed, so check the soil moisture daily, and water if it begins to feel dry. Plastic containers typically dry out more slowly than wood boxes, since wood loses some moisture from the sides. Keep the box in an area that receives full sunlight. If you don't have a consistently sunny area, place the box on a wheeled cart and move it to follow the sun.