Java: round to nearest multiple of 5 (either up or down) March 25, 2023 by Tarik haven’t tested it, but 5*(Math.round(f/5)); should work