Entanglement is recognized as a key resource for quantum computation1 and quantum cryptography2. For quantum metrology, the use of entangled states has been discussed3, 4, 5 and demonstrated6 as a means of improving the signal-to-noise ratio. In addition, entangled states have been used in experiments for efficient quantum state detection7 and for the measurement of scattering lengths8. In quantum information processing, manipulation of individual quantum bits allows for the tailored design of specific states that are insensitive to the detrimental influences of an environment9. Such 'decoherence-free subspaces' (ref. 10) protect quantum information and yield significantly enhanced coherence times11. Here we use a decoherence-free subspace with specifically designed entangled states12 to demonstrate precision spectroscopy of a pair of trapped Ca+ ions; we obtain the electric quadrupole moment, which is of use for frequency standard applications. We find that entangled states are not only useful for enhancing the signal-to-noise ratio in frequency measurements—a suitably designed pair of atoms also allows clock measurements in the presence of strong technical noise. Our technique makes explicit use of non-locality as an entanglement property and provides an approach for 'designed' quantum metrology.