I've built a few halfstocks, and in my opinion, there's no set formula. Mostly it's what looks and feels the best. I just measured a few of mine, and the end of the forearm is always a few inches shorter than half the length of the barrel. The length also depends on whether you are using one or two barrel keys. I've seen some halfstocks with long forearms and just one key, and they look kinda "funny". You definitely don't want to end the stock at the balance point, as you would be wrapping your hand around the nose cap when carrying the gun.
Years ago, I found a photo of a halfstock I liked, I think it was on TOTW, that stated the barrel length. I printed out the picture and scaled off the barrel into inches, then scaled off the whole rifle. This gave me the measurement from the breech to the end of the forearm. Just a ballpark measurement, and I think in the end, I tweaked that measurement to what looked best for my likes. Probably no more than a half inch difference either way. Any more, I just stand back, with the rifle roughly put together, and decide how much to cut off the forearm, based on looks. Hope this helps, Bill.