We describe how the full, isotropic and anisotropic, magnetisation of samples as small as tens of micrometers in size can be sensitively measured using a piezoresistive microcantilever and a small, moveable ferromagnet. Depending on the position of the ferromagnet, a strong but highly local field gradient of up to ∼4200 T/m can be applied at the sample or removed completely during a single measurement. In this way, the magnetic force and torque on the sample can be independently determined without moving the sample or cycling the experimental system. The technique can be used from millikelvin temperatures to ∼85 K and in magnetic fields from 2 T to the highest fields available. We demonstrate its application in measurements of the semimagnetic semiconductor Hg 1−x Fe x Se, where we achieved a moment sensitivity of better than 2.5 × 10 −14 J/T for both isotropic and anisotropic components.