This is one of the trickier questions in Islamic finance. As Jeffrey Harding pointed out in his recent article, The Money That Prays, the definition of riba is problematic, especially for non-Muslims:
After a long study of Islamic finance, the anthropologist Bill Maurer couldn’t settle on ‘interest’ as the perfect translation: it seemed clear at first but became streaky as he looked closer. ‘Usury’ is the obvious alternative, but are we to rely on the older sense of the term – any charge, however small, for the use of borrowed money – or on the way it’s understood today, as extortionate interest only? Wilson, a professor in the School of Government and International Affairs at Durham who is intrigued by ‘the influences of religious belief on economic behavior’, holds that riba is usury in the first sense. That’s the view of most practicing Muslims; it seems to echo the meaning of the word in Deuteronomy, where Moses instructs the people of Israel not to lend to their own kith and kin at a rate: ‘Unto a stranger thou mayest lend upon usury; but unto thy brother thou shalt not lend upon usury.’ Very close to ‘interest’ after all then. Yet if, like Melanie Phillips, you believe Islamic banking in the UK merely hastens the day when a green flag is raised over Westminster, it’s important to think of ‘usury’ in the later sense, in order to insist that Muslim law is either deluded or deceitful: ‘The whole issue of sharia finance,’ Phillips wrote last year, ‘is based on a fabrication . . . sharia does not proscribe interest. It proscribes usury.’
Phillips, a known Islamophobe, would obviously want riba to be "usury" in the modern sense, an excessive interest rate. However, Phillips is not an Islamic scholar by any stretch of the imagination. Riba, in my opinion, is any amount of interest, even one cent above the amount of principal. Consider the following ahadith:
Narrated Abu Salih Az-Zaiyat:
I heard Abu Said Al-Khudri saying, "The selling of a Dinar for a Dinar [gold], and a Dirham for a Dirham [silver] (is permissible)." I said to him, "Ibn 'Abbas does not say the same." Abu Said replied, "I asked Ibn 'Abbas whether he had heard it from the Prophet s or seen it in the Holy Book. Ibn 'Abbas replied, "I do not claim that, and you know Allah's Apostle better than I, but Usama informed me that the Prophet had said, 'There is no riba (in money exchange) except when it is not done from hand to hand (i.e., when there is a delay in payment).' " (Bukhari: 3.34.386)
Abu Salih reported: I heard Abu Sa'id al-Khudri (Allah be pleased with him) said: Dinar (gold) for gold and dirham for dirham can be (exchanged) with equal for equal; but he who gives more or demands more in fact deals in interest. I sald to him: Ibn 'Abbas (Allah be pleased with them) says otherwise, whereupon he said: I met Ibn 'Abbas (Allah be pleased with them) and said: Do you see what you say; have you heard it from Allah's Messenger (may peace be upon him), or found it in the Book of Allah, the Glorious and Majestic? He said: I did not hear it from Allah's Messenger (may peace be upon him). and I did not find it in the Book of Allah (Glorious and Majestic), but Usama b. Zaid narrated it to me that Allah's Apostle (may peace be upon him) said: There can be an element of interest in credit. (Muslim: 10.3876)
Ubaidullah b. Abu Yazid heard Ibn 'Abbas (Allah be pleased with them) as saying: Usama b. Zaid reported Allah's Apostle (may peace be upon him) as saying: There can be an element of interest in credit (when the payment is not equal). (Muslim: 10.3877)
Ibn 'Abbas; (Allah be pleased with them) reported on the authority of Usama b. Zaid Allah's Messenger (may peace be upon him) as having said this: There is no element of interest when the money or commodity is exchanged hand to hand. (Muslim: 10.3878) [In other words, what is known as a spot transaction.]
What I find interesting is that riba applies even to material goods. Consider:
Abd Sa'id reported: Bilal (Allah be pleased with him) came with fine quality of dates. Allah's Messenger (may peace be upon him) said to him: From where (you have brought them)? Bilal said: We had inferior quality of dates and I exchanged two sa's (of inferior quality) with one sa (of fine quality) as food for Allah's Apostle (may peace be upon him), whereupon Allah's Messenger (may peace be upon him) said: Woe! it is in fact usury; therefore, don't do that. But when you intend to buy dates (of superior quality), sell (the inferior quality) in a separate bargain and then buy (the superior quality). And in the hadith transmitted by Ibn Sahl there is no mention of" whereupon". (Muslim: 10.3871)
Narrated Abu Burda: When I came to Medina. I met Abdullah bin Salam. He said, "Will you come to me so that I may serve you with sawiq (i.e. powdered barley) and dates, and let you enter a (blessed) house that in which the Prophet entered?" Then he added, "You are In a country where the practice of riba (i.e. usury) is prevalent; so if somebody owes you something and he sends you a present of a load of chopped straw or a load of barley or a load of provender then do not take it, as it is riba." (Bukhari: 5.58.159)
In the first hadith, the excess quantity of dates traded (the inferior quality dates) was riba and therefore haram; even an equal trade of inferior for superior dates would be haram as the quality of the two sets of dates would not have been equal. Thus, a halal transaction is two sided, the sale of the inferior dates for cash first, the purchase of the superior dates for cash second.
The second hadith is even more interesting for how commonplace this custom is. "I owe you, and I'm repaying my debt to you, but let me also give you this gift to make up for the fact that I owed you the repayment (and maybe I was late in making payment)." Sound familiar? That's riba, too.