In this paper, we prove the Fukui–Kurdyka–Paunescu conjecture, which says that sub-analytic arc-analytic bi-Lipschitz homeomorphisms preserve the multiplicities of real analytic sets. We also prove several other results on the invariance of the multiplicity (respectively, degree) of real and complex analytic (respectively, algebraic) sets. For instance, still in the real case, we prove a global version of the Fukui–Kurdyka–Paunescu conjecture. In the complex case, one of the results that we prove is the following: if $(X,0)\subset (\mathbb {C}^{n},0)$, $(Y,0)\subset (\mathbb {C}^{m},0)$ are germs of analytic sets and $h\colon (X,0)\to (Y,0)$ is a semi-bi-Lipschitz homeomorphism whose graph is a complex analytic set, then the germs $(X,0)$ and $(Y,0)$ have the same multiplicity. One of the results that we prove in the global case is the following: if $X\subset \mathbb {C}^{n}$, $Y\subset \mathbb {C}^{m}$ are algebraic sets and $\phi \colon X\to Y$ is a semi-algebraic semi-bi-Lipschitz homeomorphism such that the closure of its graph in $\mathbb {P}^{n+m}(\mathbb {C})$ is an orientable homological cycle, then ${\rm deg}(X)={\rm deg}(Y)$.