Conjugate prior
Is there a formula instead of a simulation? A prior is conjugate to a given likelihood if the posterior distribution belongs to the same family of distributions as the prior. Then it is enough to update the parameters of the distribution.
Example: Prior Beta(a, b), then k successes in n trials: posterior Beta(a + k, b + n - k). With Beta(2, 2) and 14 of 20 this gives Beta(16, 8).
Caution: Conjugate means convenient, not necessarily suitable. The prior should match prior knowledge, not the form of the calculation.