The biomass ratio of herbivores to producers reflects the structure of a community. Four primary factors have been proposed to affect this ratio, including production rate, defense traits, and nutrient contents of producers as well as predation by carnivores. However, the relative importance of these factors across natural communities is elusive, in part because of the lack of a framework for quantitatively comparing their effect sizes. Here, we develop a framework based on Lotka-Volterra equations for examining the relative importance among these factors in determining the biomass ratio. We further utilize it to analyze plankton communities in experimental ponds with different carnivore (fish) abundance and light input. We found that all four factors contributed significantly to the biomass ratio, but carnivore abundance had the largest effect size, followed by the stoichiometric nutrient content. The present framework is useful for quantifying relative roles of these factors shaping terrestrial and aquatic communities.