Philosophers typically rely on intuitions when providing a semantics for counterfactual conditionals. However, intuitions regarding counterfactual conditionals are notoriously shaky. The aim of this paper is to provide a principled account of the semantics of counterfactual conditionals. This principled account is provided by what I dub the Royal Rule, a deterministic analogue of the Principal Principle relating chance and credence.\ud \ud The Royal Rule says that an ideal doxastic agent's initial grade of disbelief in a proposition A, given that the counterfactual distance in a given context to the closest A-worlds equals n, and no further information that is not admissible in this context, should equal n. Under the two assumptions that th...