Sounds prohibitively expensive to either hold screws in 1mm increments or custom-order screws from suppliers. A 25mm screw might be 10c, and then a 26mm might be $6! An M5 screw holder for cutting purposes isn't enormously complex to make- just a tapped hole through a small metal block, slitted and drilled/tapped the other way to clamp it. Can then use a Dremel, angle grinder, chop saw, band saw, cold chisel, hydraulic shear... Whatever. Personally, I'm lazy and just clamp them in aluminum barstock in the bandsaw vice and then tidy up the end with a drill and a bench grinder afterward. It's fast, but tedious if there's more than a couple, and not super accurate. But there's definitely a better way.
I use a 5mm die. run the bolt through the die to the length you want it. use a dremel or cut off wheel on your grinder. as you back out the bolt the die does a nice job cleaning the end of the bolt.