The integration of sensors in cyber‐physical systems has given rise to data markets, where data owners can offer their sensing data for sale to potential buyer. However, determining the optimal data price in such markets is a complex issue, which demands a careful consideration of the interests of all parties involved, as well as the potential privacy loss for data sellers. By taking privacy loss into account, this paper proposes a fair compensation model for data sellers and formulates the pricing problem as a Stackelberg game. An automatic data pricing algorithm is developed to calculate the optimal price maximizing the joint benefits of the data sellers and the buyer where the privacy loss of the data sellers are compensated reasonably. Numerical simulations validate the effectiveness of the proposed pricing model in balancing benefits and privacy loss.