Use the sample formula, which divides by n-1 (Bessel's correction).
This is appropriate when the data is a sample drawn from a larger population and you want an unbiased estimate of the population parameter.