# Defining origin when calculating center of mass

What rules are there concerning where to place the origin when calculating center of mass? Take this simple example:

$0.5$ kg and $2.0$ kg, connected by a massless rod $0.5$ m long rod.

By using the common formula $\frac{\sum_i^n m_i\ y_i}{\Sigma m}$ one gets two different results, depending on which of the two masses is chosen as the origin. Specifically $0.40$ m and $0.10$ m. The right choice here is obvious due to common sense, but my textbook doesn't say anything about why. Am I missing something obvious?