From writing policy to choosing a restaurant, people use rankings to make decisions every day. In many applications, statisticians treat point estimates as if they were known, ignoring differences in uncertainty. To better account for varying uncertainty, we can instead rank using a loss function. Square error loss is a typical choice but, while this is optimal for certain applications, it often doesn't align with user priorities. We propose a family of alternative loss functions to make these priorities more explicit. These loss-based ranking functions have four components: (1) inferential goal (rank position or pairwise comparisons), (2) scale (original, rank, or other), (3) loss (0/1, squared error or absolute error), and (4) weighted importance of each rank position. This framework can be tailored to users' inferential goals to provide optimal ranks by rank position and nearly optimal ranks by pairwise comparisons. We use county health data to illustrate how this framework produces rankings that account for varying levels of error while closely aligning with users' inferential goals.als.