Entanglement is recognized as a key resource for quantum computation and quantum cryptography. For quantum metrology, the use of entangled states has been discussed and demonstrated as a means of improving the signal-to-noise ratio. In addition, entangled states have been used in experiments for efficient quantum state detection and for the measurement of scattering lengths. 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 environment. Such 'decoherence-free subspaces' (ref. 10) protect quantum information and yield significantly enhanced coherence times. Here we use a decoherence-free subspace with specifically designed entangled states 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.