Math.Round((double)(ViewBag.stars5 / ViewBag.totalRating) * 100) returns 0 code example Example: round to int 32 c# Convert.Toint64(number)