The OP is asking about internal ballistics of black powder and round projectiles.
This has actually been studied and mathematical relationships or models have been developed.
The first scientific investigation was conducted in the early 1700's by Benjamin Robins (1707 - 1751) and published in his "
The New Principles Of Gunnery" in 1742. Robins approached the problem from a physics perspective using Newton's Laws.
A discussion of Benjamin Robins work can be found here
Benjamin Robins on Ballistics. This link derives a general equation for velocity.
View attachment 53831
This link,
Smooth Bore Cannon Ballistics, developed more specific equations. The equations are for cannon ballistics, but Robins tested them using a round ball of .75" diameter, so they still apply to small diameter guns. The coefficient may need to be adjusted to match modern powder energy.
View attachment 53833
The link above actually gives some JavaScript source code to do the calculations, though I would find it easier to do the calculations in Excel.
There is some other work I found some time back that approaches the problem from an empirical perspective. That work can be found at this link,
Internal Ballistics of Muzzleloaders. This link is especially math heavy and will probably make most peoples' eyes glaze over and mind go numb, but the answer to the OP's question is embedded in this webpage by using his Equation 7 and the regression constants that best fit the gun the OP is working with.
The author has chosen to do his analysis and derive his equations for Muzzle Engery, but this can be converted to Muzzle Velocity with his Equation 5 and rearranging it to solve for velocity.
Either of these approaches will give you and estimate that may or may not be very accurate for any specific gun. As pointed out in other posts, there are a number of different variables that effect the velocity obtained from a gun and any equation or calculator will only give an "average" value. Actual measurements will likely vary to some degree from this "average".