Like Astro said, the math is pretty simple if you know your target %, current %, and system volume.
Using this graph I found on this site:
https://forum.miata.net/vb/showthread.php?t=632985
Lets say your currently at -6F freeze point (since that's conveniently 40% on the graph) and your cooling system holds 2 liters. That means you're current system is has 0.8l coolant, 1.2l water. If your goal is 50% concentration, you need to take out enough water (and unfortunately coolant) so that your system has 1l of water left. That means you need to remove 0.2l of water. At the present 40% concentration, if you remove 0.333l of the mixture (0.2l/.6l), you're, you're removing 0.2l of water and 0.133l of coolant. But, more importantly, at that moment, your system has 0.667l of coolant and 1l of water. Then, you top off your system with undiluted coolant (0.333l, or to system capacity of 2l) and there you go, you have a 50% mixture.
So, the equations are:
X = system capacity
Y = current percent antifreeze
Z = target percent antifreeze
X*(1-Y) (total amount of water)
X*(1-Z) (target total water)
X*(Y-Z) (total water to remove)
Remove this quantity:
X*((Y-Z)/(1-Y)) (total current coolant to remove)
Then top off with undiluted antifreeze until full.