The Pythagoras number of a field $K$ is the minimum number n such that any sum of squares in $K$ can be written as a sum of $n$ squares in $K$, or $\infty$ if such a number does not exist. Despite its elementary definition, computing the Pythagoras number of a field can be very complicated. In this talk, based on a joint work with Karim Johannes Becher, we describe a method to prove, in presence of a certain local-global principle for $(n + 1)$-fold Pfister forms, that the Pythagoras number of a field is at most $2^n + 1$. We also explain how to apply this method in order to give a bound for the Pythagoras number of a few interesting fields.