Abstract Sentence length, defined by the number of words contained in a sentence, has always been of great concern in linguistic research. Many studies have been conducted on the distribution of sentence length in specific languages. To further explore the characteristics and patterns of sentence length and their relationship with dependency distance in Spanish, we use the SUD syntactic treebank and conduct a quantitative analysis within the theoretical framework of dependency grammar. It is found that the sentence length distribution of Spanish follows a positive negative binomial model, and there is no significant difference in sentence length distribution among different mean dependency distances (MDDs), but the distribution of the number of sentences in different sentence length intervals follows a normal distribution. In Spanish, sentence length and MDD interact with each other – the longer the sentence is, the greater the MDD is, and vice versa – which is consistent with previous research findings. Also, as sentence length increases in Spanish, short-distance dependencies decrease, but remain within a certain range of fluctuations, which confirms once again that language is a complex and self-adaptive system driven by humans.