To compute PR you need not only one algorithm but a database of billion or trillion of URL web pages (index) and this is the very hard part to get. There are some tools that tells you the Page Rank for an URL and you can find some of them googling, but I do not know if they get the figure from google or they mantain their own index database. There are also toolbars, extensions or plugins for different browsers that provide you this information and other useful SEO data.
Other algorithms has been defined to refine the reputation calculation and making difficult manipulation by taking into account not online the number of incoming links of a web page but also the trustworthiness of the origin pages or also the likeliness that those links have been established by humans and not by automatic processes.
If you only need the algorithm but do not need to make the calculations (for that you will need an index of some size), you can find implementation in the Wikipedia http://en.wikipedia.org/wiki/PageRank#Computation
i think you can get simple algorithm of PR checking from prchecker.net or you can download any web theme having this built in feature and from there you can extract the code or link.