The ability of saltmarshes to reduce wave energy makes these ecosystems a resilient coastal solution for coastal defense. Currently, numerical models such as Simulating Waves Nearshore (SWAN) calculate the wave attenuation through these vegetated fields. The approach implemented in SWAN, simulates vegetation as cylinders and makes it necessary to obtain parameters such as plant height, density and diameter beforehand to define the vegetation field. Additionally, it relies on the correct definition of a bulk drag coefficient (C-D) value. C-D can be obtained by calibration or via empirical formulations if a predictive approach is needed. These empirical formulas are relationships between a dimensionless number, such as the Reynolds number (Re) or the Keulegan Carpenter number (KC), defined as a function of the vegetation characteristics and C-D. Therefore, they are case -specific. To overcome this limitation, a new formulation is implemented in SWAN to obtain the wave height attenuation through saltmarshes. This new formula depends on the meadow standing biomass and the plant height and, more important, it does not need calibration. This predictive method is implemented and validated for four different saltmarsh species, each with different geometrical and biomechanical properties. Validation is performed considering laboratory data reported by Maza et al. (2021). In conclusion, this new implementation in SWAN results in a predictive tool that allows obtaining the wave energy attenuation produced by saltmarshes.