Are you talking about an 18th century sailing ship or a modern ship. I remember filling fuel tanks with water after each intermediate tank was emptied to maintain the same ballast. LONG story on that. The principals are the same whether using shingle or water but are you trying to determine how much to put in a model sailing ship or something else? In general more advanced calculations, based on the ship's displacement and the desired metacentric height (a measure of stability), were used by some shipwrights to determine ballast requirements.
For the old sailing ships, the following may be helpful
From the internet:
In the 1800s, determining the amount of ballast needed on a sailing ship involved considering factors such as the ship's design, cargo type, and anticipatd sea conditions with the primary goal of achieving sufficient stability by loading heavy materials like rocks, stones, or iron bars into the ship's hold, usually until the desired draft was reached, especially when carrying light cargo or sailing empty; essentially, enough ballast to ensure the ship didn't become too top-heavy and remained stable in rough seas, but not so much that it significantly impacted cargo capacity.