How to Calculate Win-Loss Percentage in Excel (5 Easy Ways)

To calculate win-loss percentage in Excel, you need to put the number of wins and losses for a team in two separate columns. Based on this data, we can use mathematical calculations to express wins/losses as a percentage of total games played (wins plus losses).
For this, we’ll use a basic division formula and the Percent Style option to turn the result into a Percentage.

Key Takeaways

Steps to calculate win-loss percentage:

➤ First, put the wins and losses in separate columns like wins in Column C and losses in Column D. To put the win percentage in Column E, enter the following formula in its first cell:
=C2/(C2+D2)
➤ Press Enter and drag the formula down if needed.
➤ Now, select all the output cells in Column E and go to the Home tab.
➤ In the Number group, click the Percent Style button to transform the returned values into percentages. Repeat the method to calculate the loss percentage.

overview image

In this article, we’ll cover all the ways of calculating win-loss percentage in Excel using basic division formulas, functions like COUNTIF and COUNTA, and VBA coding.

Download Practice Workbook
1

Calculating Win-Loss Percentage for Each Row by Formatting Cells

In our example dataset, we have the number of yearly wins and losses for several college basketball teams. We have columns for the team name, year, number of wins, and losses. We’ll calculate the win percentage in Column E and the loss percentage in Column F.

Calculating Win-Loss Percentage for Each Row by Formatting Cells

In this method, we’ll use a formula to divide the yearly wins by the total wins and losses. Later on, we’ll format the cells as percentages. Here’s how:

➤ Use any of the following formulas depending on whether you want to calculate win or loss percentage:

For Win Percentage

➤ In the first cell of Column E, insert the following formula and press Enter:

=C2/(C2+D2)

Calculating Win-Loss Percentage for Each Row by Formatting Cells

For Loss Percentage

Enter the following formula in the first cell of Column F and click Enter:

=D2/(C2+D2)

Calculating Win-Loss Percentage for Each Row by Formatting Cells

➤ Here, C2 is the cell containing the number of wins and D2 contains the losses. Change the cell references according to your dataset.
➤ Drag the formulas down using the fill handle (+ sign on the bottom corner of a cell) to autofill the remaining cells.
➤ Now, select all the cells with the returned values and go to the Home tab.
➤ In the Number group, click the Percentage Style button to format the cells as percentages.

Calculating Win-Loss Percentage for Each Row by Formatting Cells

➤ Or, you can right-click on the selection and choose Format Cells >> Percentage >> Ok.

Calculating Win-Loss Percentage for Each Row by Formatting Cells

➤ Here’s the final result for our dataset:

Calculating Win-Loss Percentage for Each Row by Formatting Cells


2

Computing Win or Loss Percentage Using Total Number of Games

If you have only the wins or losses and the total number of games, you must use a different formula than the previous one. We have the wins in Column C and the total number of games in Column D. We’ll calculate the win and loss percentages in Column E and Column F respectively.

For Win Percentage

➤ Choose a blank cell in Column E, insert the following formula, and press Enter:

=C2/D2

Computing Win or Loss Percentage Using Total Number of Games

For Loss Percentage

Type the following formula in a blank cell of Column F and click Enter:

=(D2 – C2) / D2

Computing Win or Loss Percentage Using Total Number of Games

➤ Here, cell C2 contains wins and cell D2 has the total number of games. Replace the cell references as needed.
➤ Drag the formulas down using the fill handle.
➤ Choose all the cells with the returned values and click on the Home tab. From the Number group, press the Percentage Style button and Excel will return the win/loss percentages.

Computing Win or Loss Percentage Using Total Number of Games

➤ The final output should look like this:

Computing Win or Loss Percentage Using Total Number of Games


3

Determining Win-Loss Percentage from Text-Based Results

In the previous methods, we calculated the win-loss percentage for individual cells. When you have a list of text-based data and you want to count percentages based on total entries, you need to use the COUNTIF and COUNTA functions.

Here, we have a list of game results as W (win) and L (loss) in Column D (D2:D10). We’ll put the calculated win and loss percentage in cells G1 and G2 respectively. Below are the steps:

For Win Percentage

➤ In cell G1, insert the following formula, and press Enter:

=COUNTIF(D2:D10, “W”)/COUNTA(D2:D10)

Determining Win-Loss Percentage from Text-Based Results Using the COUNTIF and COUNTA Functions

For Loss Percentage

Type the following formula in cell G2 and click Enter:

=COUNTIF(D2:D10, “L”)/COUNTA(D2:D10)

Determining Win-Loss Percentage from Text-Based Results Using the COUNTIF and COUNTA Functions

➤ Here, the range D2:D10 contains the texts that indicate wins and losses. Change the range according to your source data.
➤ Finally, select both cells with the returned values and click on the Home tab >> Percent Style button.

Determining Win-Loss Percentage from Text-Based Results Using the COUNTIF and COUNTA Functions

➤ The final result for our dataset looks like this:

Determining Win-Loss Percentage from Text-Based Results Using the COUNTIF and COUNTA Functions


4

Calculating Win-Loss Percentage for Sales Data

For this method, we’ll use a dataset for individual sales with buying and selling prices in Columns C and D. Our goal is to calculate the win/profit or loss percentage for each sale in Column E. After that, we’ll determine the total win-loss percentage for all the entries in cells C12 and C13. Let’s get to the steps:

➤ In the first cell of Column E, enter the following formula:

=(D2-C2)/C2

➤ We have the buying price in cell C2 and the selling price in cell D2. Change the references as needed.
➤ Press Enter and drag the formula down.

Calculating Win-Loss Percentage for Sales Data

➤ As this formula returns positive values for wins/profits and negative values for losses, select all the returned values and click on the Home tab >> Percent Style button.

Calculating Win-Loss Percentage for Sales Data

➤ Proceed only if you want to calculate the win-loss percentage for the total number of entries.
➤ Now, in Column F, we’ll assign W for each win and L for each loss using the IF function. For this, type the following formula in cell F2:

=IF(E2>0,”W”,”L”)

➤ E2 is the first cell in our dataset containing the win/loss percentage. Replace the reference as per your source data.
➤ Click Enter and drag the formula down.

Calculating Win-Loss Percentage for Sales Data

➤ Finally, to count the total win-loss percentage for all entries, type any of the formulas given below:

For Total Win Percentage

➤ Insert this formula in cell C12 and press Enter:

=(COUNTIF(F2:F10,”W”))/COUNTA(F2:F10)

➤ Here, F2:F10 is the range containing the texts W/L for wins and losses. Change the range as required.

Calculating Win-Loss Percentage for Sales Data

For Total Loss Percentage

➤ Type this formula in cell C13 and click Enter:

=(COUNTIF(F2:F10,”L”))/COUNTA(F2:F10)

➤ Replace the range F2:F10 as required.

Calculating Win-Loss Percentage for Sales Data

➤ Select both cells with the returned values and click on the Home tab >> Percent Style button.

Calculating Win-Loss Percentage for Sales Data


5

Automate the Win-Loss Calculation With a VBA Macro

For larger datasets, it’s better to customize a VBA macro for accurate calculations. Here’s how to create a VBA macro that gives you percentages based on the given numbers of wins and losses:

➤ If you don’t have the Developer tab in your top ribbon, go to the File tab >> More >> Options.

Automate the Win-Loss Calculation With a VBA Macro

➤ Select Customize Ribbon from the first column and check the Developer box. Click Ok.

Automate the Win-Loss Calculation With a VBA Macro

➤ Now, open the Developer tab and select Visual Basic from the Code group.

Automate the Win-Loss Calculation With a VBA Macro

➤ As the VBA Editor appears, click on the Insert tab and select Module.

Automate the Win-Loss Calculation With a VBA Macro

➤ Paste the following code in the blank module box:

Sub CalculateWinLossPercentage()
    Dim winRange As Range, lossRange As Range
    Dim winOutputCell As Range, lossOutputCell As Range
    Dim i As Long, totalRows As Long
    Dim winVal As Double, lossVal As Double
    Dim winPct As Variant, lossPct As Variant
    ' Prompt user to select ranges
    On Error Resume Next
    Set winRange = Application.InputBox("Select the WIN range", Type:=8)
    If winRange Is Nothing Then Exit Sub
    Set lossRange = Application.InputBox("Select the LOSS range", Type:=8)
    If lossRange Is Nothing Then Exit Sub
    Set winOutputCell = Application.InputBox("Select the first cell to output WIN %", Type:=8)
    If winOutputCell Is Nothing Then Exit Sub
    Set lossOutputCell = Application.InputBox("Select the first cell to output LOSS %", Type:=8)
    If lossOutputCell Is Nothing Then Exit Sub
    On Error GoTo 0
    ' Ensure same number of rows
    If winRange.Rows.Count <> lossRange.Rows.Count Then
        MsgBox "Win and Loss ranges must have the same number of rows.", vbCritical
        Exit Sub
    End If
    totalRows = winRange.Rows.Count
    ' Loop through each row
    For i = 1 To totalRows
        winVal = Val(winRange.Cells(i, 1).Value)
        lossVal = Val(lossRange.Cells(i, 1).Value)
        If winVal + lossVal > 0 Then
            winPct = winVal / (winVal + lossVal)
            lossPct = lossVal / (winVal + lossVal)
        Else
            winPct = ""
            lossPct = ""
        End If
        winOutputCell.Offset(i - 1, 0).Value = winPct
        lossOutputCell.Offset(i - 1, 0).Value = lossPct
    Next i
    ' Format as percentage
    winOutputCell.Resize(totalRows, 1).NumberFormat = "0.00%"
    lossOutputCell.Resize(totalRows, 1).NumberFormat = "0.00%"
    MsgBox "Win/Loss percentages calculated successfully!", vbInformation
End Sub

➤ Press  F5  or go to the Run tab and select Run Sub/UserForm.

Automate the Win-Loss Calculation With a VBA Macro

➤ When Excel prompts you to select the cells with wins, go back to the Excel tab and highlight the cells containing the number of wins. Click Ok.

Automate the Win-Loss Calculation With a VBA Macro

➤ Similarly, highlight the cells containing the number of losses and press Ok.

Automate the Win-Loss Calculation With a VBA Macro

➤ Now, select the first cell where you want to put the win percentage. Click Ok.

Automate the Win-Loss Calculation With a VBA Macro

➤ Do the same to select a cell for the loss percentage.

Automate the Win-Loss Calculation With a VBA Macro

➤ Excel will now return the percentages for each row.

Automate the Win-Loss Calculation With a VBA Macro


Frequently Asked Questions

How to calculate win-loss percentage in Excel with ties?

Ties are calculated as half (0.5) a win and half (0.5) a loss. So, if your wins are in cell A2, losses in B2, and ties in C2, use this formula to calculate win percentage:
=(A2+0.5*C2)/(A2+B2+C2)
For loss percentage, enter this formula:
=(B2+0.5*C2)/(A2+B2+C2)
Press Enter. Select the output cell and click on the Home tab >> Percent Style button.

How to calculate the win-to-loss ratio in Excel?

To calculate the win-to-loss ratio, we’ll divide the wins by the losses. Let’s say cell A2 has the number of wins and cell B2 contains the losses. Enter this formula to calculate the ratio in cell C2:
= A2 / B2
When no losses occur, use this formula to avoid divide-by-zero errors:
=IF(C2=0, “N/A”, A2/B2)

How to calculate average loss percentage?

Let’s calculate the average loss percentage for a list of losses for multiple players or teams. If the losses are in cell A2 and the total games are in cell B2, insert this formula in cell C2:
=A2 / B2
Click Enter and drag the formula down. Now, all the loss values are in the range C2:C10. To calculate the average, use this formula:
=AVERAGE(C2:C10)
Now, format the output as a percentage by clicking on the Home tab >> Percent Style button.


Concluding Words

Depending on your dataset, you can use some basic division, addition, and subtraction formulas to calculate win percentages. Instead of manual counting, use Excel’s percentage format to instantly turn a result into the correct percentage. If you have a more complex dataset, make sure to use the VBA macro to handle errors.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo