Natural landscape elements (NLEs) in agricultural landscapes contribute to biodiversity and ecosystem services, but are also regarded as an obstacle for large‐scale agricultural production. However, the effects of NLEs on crop yield have rarely been measured. Here, we investigated how different bordering structures, such as agricultural roads, field‐to‐field borders, forests, hedgerows, and kettle holes, influence agricultural yields. We hypothesized that (a) yield values at field borders differ from mid‐field yields and that (b) the extent of this change in yields depends on the bordering structure. We measured winter wheat yields along transects with log‐scaled distances from the border into the agricultural field within two intensively managed agricultural landscapes in Germany (2014 near Göttingen, and 2015–2017 in the Uckermark). We observed a yield loss adjacent to every investigated bordering structure of 11%–38% in comparison with mid‐field yields. However, depending on the bordering structure, this yield loss disappeared at different distances. While the proximity of kettle holes did not affect yields more than neighboring agricultural fields, woody landscape elements had strong effects on winter wheat yields. Notably, 95% of mid‐field yields could already be reached at a distance of 11.3 m from a kettle hole and at a distance of 17.8 m from hedgerows as well as forest borders. Our findings suggest that yield losses are especially relevant directly adjacent to woody landscape elements, but not adjacent to in‐field water bodies. This highlights the potential to simultaneously counteract yield losses close to the field border and enhance biodiversity by combining different NLEs in agricultural landscapes such as creating strips of extensive grassland vegetation between woody landscape elements and agricultural fields. In conclusion, our results can be used to quantify ecocompensations to find optimal solutions for the delivery of productive and regulative ecosystem services in heterogeneous agricultural landscapes.