Neutron mass: 1.008664 u

Proton mass: 1.007276 u

Why the discrepancy?

On a related note, how does one go about measuring the mass of a neutron or proton, anyway?
['https://physics.stackexchange.com/questions/85', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/104/']
Masses and coupling between quarks are free parameters in the standard model, so there is not real explanation to that fact.

About the measurment: you can have a look at this [wikipedia article about Penning traps](http://en.wikipedia.org/wiki/Penning_trap) which are devices used for precision measurements for nucleus. Through the cyclotron frequency (Larmor factor) we can obtain the mass of the particle.

Edit: "A neutron is a proton + an electron" is a common answer to this question, but it is a totally invalid reasoning.

Both protons and neutrons are made of three quarks. The mass of the quarks is not known with enough precision, and even more important (and that's a why for the masses of the quarks), the interaction between them is responsible for the mass value to a much larger extend.
We can write approximately assuming strong energy $E\_s$ contribution inside proton and neutron is almost the same:

$m\_n c^2 = m\_d c^2 +m\_d c^2 +m\_u c^2 +E\_s $

$m\_p c^2 = m\_u c^2 +m\_u c^2 +m\_d c^2 +E\_s +E\_c $
in terms of quark u and d masses and $E\_c$ - electrostatic energy around and inside the proton, which can be calculated classically $E\_c = \frac{3}{5} \frac{k e^2} {R} = 1 MeV $, and R=0.87 fm is charge radius from scattering experiments.
Thus we have
 $m\_n c^2 -m\_p c^2 $ = $ m\_d c^2 - m\_u c^2 - E\_c $ = 4.8 MeV - 2.3 MeV - 1 MeV= 1.5 MeV

On the other hand we have $m\_n c^2 -m\_p c^2 $ = 1.3 MeV i.e very close (and quark masses are not know so precisely)