Nordic Semiconductor, the manufacturer of the System on a Chip (SoC) in most beacons has a useful online calculator that helps work out the battery current used when advertising or when connected.
You need to set the SoC chip type (see the specification for the beacon you are using), voltage (3v as it’s usually a coin cell), DCDC (usually off), clock (usually external) and tx payload (set to 31 bytes). You can then vary the role (advertising or connected), power and advertising interval to see the affect on the battery current.
Dividing the battery capacity by the current will gives the approximate battery life. The resultant battery life calculation will be a very rough approximation and will be less if the manufacturer has added extra circuitry such as sensors. The online calculator is best used to get an appreciation of how changing parameters or the SoC type affects battery life rather than being a definitive value. For more accurate battery use it’s necessary to measure the actual battery current.