It is relatively well accepted that costs associated with transfers weigh upon water markets and deter some exchanges. But few studies explicitly address such costs and their impacts on trading behavior. In this article we fill this gap, using a tool from the international trade literature called the gravity equation. We first develop a theoretical model to assess the micro-foundation of this approach in a water market context. The model distinguishes between variable and fixed costs of trade, which allows us to disentangle the decision to enter into the water market (extensive margin) and the decision on the quantity of water to be transferred (intensive margin). We then test the theoretical predictions using water transfer data among California water districts over a 17-year period. We approximate transfer costs by distance and institutional factors. Results validate the theoretical predictions and show the importance of distance and institutional impediments in the decision to trade.