← Back to Blog

Excel Formula for Pass or Fail Based on Percentage (IF Function)

The Excel IF function is perfect for automatically labeling scores as "Pass" or "Fail" based on a percentage threshold. Here's how to set it up.

Basic Pass/Fail Formula

=IF(A2>=60,"Pass","Fail")

If the score in A2 is 60 or above, it returns "Pass". Otherwise "Fail". Change 60 to your threshold.

Pass/Fail Based on Percentage in Another Cell

If your score is raw (e.g., 45 out of 75) and the passing mark is 60%:

=IF(A2/B2>=0.6,"Pass","Fail")

Where A2 is the score and B2 is the total marks.

Show Percentage AND Pass/Fail Together

=TEXT(A2/B2,"0%")&" - "&IF(A2/B2>=0.6,"Pass","Fail")

Output: "72% - Pass"

Multiple Thresholds: Distinction / Merit / Pass / Fail

=IFS(A2>=80,"Distinction", A2>=70,"Merit", A2>=60,"Pass", TRUE,"Fail")

Conditional Formatting: Color Pass Green, Fail Red

  1. Select your Pass/Fail column
  2. Home → Conditional Formatting → Highlight Cells Rules → Text that Contains
  3. Type "Pass" → choose green fill; repeat with "Fail" → red fill

FAQ

What Excel formula shows Pass or Fail?

=IF(A2>=60,"Pass","Fail") — adjust 60 to your threshold.

Can I use Pass/Fail with a percentage cell?

Yes. If A2 already contains a percentage like 72%, use =IF(A2>=60%,"Pass","Fail") or =IF(A2>=0.6,"Pass","Fail").

How do I use IFS for multiple grade levels?

=IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F")

Related: Excel Weighted Grade Formula and Gradebook Template for Teachers.