cura does that has the grams you can multiply by the price/gram you bought and come up with it. get a tool to join the filaments and your good to go.
I never had much luck joining filament. I didn't try a custom tool though. Perhaps there is a good way to do it. My large format printer has a sensor to detect running out. If it does, it pauses the print, keeping everything hot, so you can swap. On the older printer, it would be nice to be able to do that though. Maybe I'll try one of the various tools out there now for it.
Some of the newer multi material setups can even swap to a new spool automatically for you. So if you are getting low, just put a fresh one in the next slot and off you go. I'm sure they could all do it with a software update if any don't have it yet.