Reliability is calculated as follows:
Reliability = 1 – Number of errors (actual or predicted)/Total number of lines of executable code
This reliability value is calculated for the number of errors during a specified time interval. Three other metrics can be calculated during extended testing or after the system is in production. They are:
MTTFF (Mean Time to First Failure)
MTTFF = The number of time intervals the system is operable until its first failure (functional failure only).
MTBF (Mean Time Between Failures)
MTBF = Sum of the time intervals the system is operable
MTTR (Mean Time To Repair)
MTTR = sum of the time intervals required to repair the system The number of repairs during the time period.
More on Metrics –
References – http://searchwarp.com/swa334239-P2.htm