Forested buffer zones with varying width have been suggested as the most promising approach for protecting boreal riparian biodiversity, reducing erosion, and minimizing nutrient leaching from managed forestry areas. Yet, less optimal fixed-width approach is still largely used, likely because of its simple design and implementation. We examined the efficiency of varying-width buffer zones based on depth-to-water (DTW) index in protecting stream riparian plant communities. We further compared the economic costs of DTW-based buffer to commonly used 5, 10 and 15 m fixed-width buffers. We also included an additional buffer based on a combination of DTW and erosion risk (Revised Universal Soil Loss Equation, RUSLE) into these comparisons to see the extent and cost of a buffer that should maximize the protection of the linked aquatic environment. Plant species richness increased with increasing soil moisture and species preferring moist conditions, nutrient-rich soils and high pH were clearly more abundant adjacent to stream in areas with high predicted soil moisture than in dry areas. Differences in species richness were paralleled by differences in community composition and higher beta diversity of plant communities in wet than in dry riparian areas. There were also several indicator species typical for moist and nutrient-rich soils for wet riparian areas. Riparian buffer zones based on DTW were on average larger than 15 m wide fixed-width buffers. However, the cost for DTW-based buffer was lower than for fixed-width buffer zones when the cost was normalized by area. Simulated selective cutting decreased the costs, but cutting possibilities were variable among streams and depended on the characteristics of forest stands. Our results thus suggest a high potential of DTW in predicting wet areas and variable-width buffer zones based on these areas in the protection of riparian biodiversity and stream ecosystems.