Water and N availability are key factors limiting crop yield, particularly in marginal soils. This study evaluated the effects of water and N stress on barley grown in marginal soils using field trials and the AgroC model. Experiments from 2020 to 2022 in Lithuania with spring barley cv. KWS Fantex under two N fertilization treatments on sandy soil provided data for model parameterization. The AgroC model simulated barley growth to assess yield potential and yield gaps due to water and N stress. Potential grain yields (assuming no water or N stress) ranged from 4.8 to 6.02 t DW ha-1, with yield losses up to 54.4% assuming only N stress and 59.2% assuming only water stress, even with the N100 treatment (100 kg N ha-1 yr-1). A synthetic case study varying N fertilization from 0 to 200 kg N ha-1 yr-1 showed that increasing N still enhanced yield, but the optimal rate of 100-120 kg N ha-1 yr-1 depended on climatic conditions, leading to uncertainty in fertilization recommendations. This study underscores the importance of integrating advanced modeling techniques with sustainable agricultural practices to boost yield potential and resilience in marginal soils. Incorporating remote sensing data to capture soil and crop variability is recommended for improving simulation accuracy, contributing to sustainable agriculture strategies in the Baltic-Nordic region.