From Jerry Palm's site:
What is the RPI?
The RPI (Rating Percentage Index) is a measure of strength of schedule and how a team does against that schedule. It does not consider things like margin of victory, only whether or not a team won and where the game was played. It is used by the NCAA as one of their factors in deciding which teams to invite to the NCAA tournament and where to seed them.
It was created in 1981 and is maintained by the NCAA Division I Men's Basketball Committee. They have always placed a premium on schedule strength when selecting teams for the tournament, so they wanted a relatively simple way to measure that and the RPI was born.
What is the formula?
The basic formula is 25% team winning percentage (WP), 50% opponents' average winning percentage (OWP), and 25% opponents' opponents' average winning percentage (OOWP).
Beginning with the 2004-05 season, the formula was changed to give more weight to road wins vs home wins. A team's win total for RPI purposes is 1.4 * road wins + neutral site wins + 0.6 * home wins. A team's losses is calculated as 0.6 * road losses + neutral site losses + 1.4 * home losses.
For example, a team that is 4-0 at home and 2-7 on the road has a RPI record of 5.2 wins (1.4 * 2 + 0.6 * 4) and 4.2 losses (0.6 * 7). That means that even though it is 6-7, for RPI purposes, it is above .500 (5.2-4.2).
This "weighted" record is only used for the 25% of the formula that is each team's winning percentage. The regular team records are used to calculate OWP and OOWP.
As always, only games against Division I opponents count in the RPI.