There's no single formula to quantify the security of an encryption algorithm. However, we do estimate a measure, the "security level", for various cryptographic functions. Security level is measured in "bits", where $n$-bit security means that an attacker would have to perform $2^n$ operations to break the system in question. Sometimes we'll further quantify different sorts of operations, or how much memory is needed. At least about $2^{112}$ bits of security is commonly considered the minimum for any system to be "secure" against practical attackers.
"Security" is a rather broad concept. There are several different notions of security. For encryption, we use the IND- definitions, which define what capabilities an attacker has. We usually require the strongest of those definitions, IND-CCA3 (AKA AE-security) to be met for a system to be considered secure, though individual components of that system may only meet lesser security definitions.