### Tags: calculating, cant, chess, elo, excel, microsoft, msdn, players, probablity, query, rating, returns, section, software, together, udf, winning

# Calculating ELO Rating (UDF Query)

On Microsoft » Microsoft Excel

3,597 words with 2 Comments; publish: Tue, 03 Jun 2008 22:14:00 GMT; (306124.02, « »)

I'm putting together a UDF that returns an ELO rating for chess players,

however I can't seem to get the probablity of winning section working.

How would I write the formula

(http://upload.wikimedia.org/math/b/2...06d0cb4ef0.png)

as a UDF?

If Ra = 1613 and Rb = 1609, the answer returned from the UDF should =

0.506 (example taken from

http://en.wikipedia.org/wiki/ELO_rating_system). It might be something

I am doing wrong with bracket positioning but I'm sure it's not.

Ea = 1 / (1 + (10 * ((Rb - Ra) / 400)))

This doen't return 0.506 like the example taken from

http://en.wikipedia.org/wiki/ELO_rating_system. Can anyone see where

I'm going wrong? Or is there a ELO UDF already out there? Thanks in

advance.

d.i.barr

d.i.barr's Profile: http://www.mcse.ms/member.php?action...o&userid=15521

View this thread: http://www.mcse.ms/showthread.php?threadid=518685

*http://excel.todaysummary.com/q_microsoft-excel_40840.html*

All Comments

Leave a comment...

- 2 Comments
- Function ELO(Ra As Double, Rb As Double) As Double
ELO = 1 / (1 + 10 ^ ((Rb - Ra) / 400))

End Function

Kind regards,

Niek Otten

"d.i.barr" <d.i.barr.243ijy_1141392609.2053.excel.todaysummary.com.excelforum-nospam.com> wrote in

message news:d.i.barr.243ijy_1141392609.2053.excel.todaysummary.com.excelforum-nospam.com...

> I'm putting together a UDF that returns an ELO rating for chess players,

> however I can't seem to get the probablity of winning section working.

> How would I write the formula

> (http://upload.wikimedia.org/math/b/2...06d0cb4ef0.png)

> as a UDF?

> If Ra = 1613 and Rb = 1609, the answer returned from the UDF should =

> 0.506 (example taken from

> http://en.wikipedia.org/wiki/ELO_rating_system). It might be something

> I am doing wrong with bracket positioning but I'm sure it's not.

> Ea = 1 / (1 + (10 * ((Rb - Ra) / 400)))

> This doen't return 0.506 like the example taken from

> http://en.wikipedia.org/wiki/ELO_rating_system. Can anyone see where

> I'm going wrong? Or is there a ELO UDF already out there? Thanks in

> advance.

>

> --

> d.i.barr

> d.i.barr's Profile:

> http://www.mcse.ms/member.php?action...o&userid=15521

> View this thread: http://www.mcse.ms/showthread.php?threadid=518685

>

#1; Tue, 03 Jun 2008 22:15:00 GMT

- Function ELO(Ra As Double, Rb As Double) As Double
- Thanks for your help Niek.
d.i.barr

d.i.barr's Profile: http://www.mcse.ms/member.php?action...o&userid=15521

View this thread: http://www.mcse.ms/showthread.php?threadid=518685

#2; Tue, 03 Jun 2008 22:16:00 GMT

- Thanks for your help Niek.