I'm not sure why you need a numeric "grade" versus the descriptive grade that Lynne refers to. But since you do, why not apply the grading system as Lynne suggests, then artificially assign a numeric grade? Perfect = 100, Stable = 80 and Failed = 60.
Why do you need to grade them?
Who or what job role is interested in this metric?
What is the purpose of the metric?
How will the information be used - in decisioning process, etc.?
You may remove "Perfect". It is unattainable in software. Have you thought about phase entry and exit criteria? Perhaps you could gather some ideas by searching on "phase entry criteria" and "phase exit criteria".
Metrics or numbers do not always work for what is needed to be shown. Think seriously about what you are trying to show and why. I also think that using terminology that makes more sense such as the descriptions for the numbers you gave tends to be more relevant. Grading builds by numbers or letters as you would grade homework or a school test is complicating issues.
I saw you had another post asking for tests for QA candidates - are you by any chance an ex teacher?