Calcualtion of Alfa chanel based on RGB

Does anyone know formula, for calculation of the Alfa value based on R G B values?

There is no such formula. Alpha is independent of RGB.
If you want to use say the brightness as alpha the formula A = 0.30R + 0.59G + 0.11*B

Thaks a lot.