Use a language specific thousand separator

Use number_format_i18n( $number ). It will format the number with respect to the current blog’s language setting. It is a wrapper for PHP’s native number_format().