Above average rent costs plus lower than average term-time income made it the least affordable.
However, Edinburgh students are still the highest social spenders and spend above the weekly average on alcohol.
The cheapest Scottish city on the RBS Student Living Index was Dundee in 10th place, with Glasgow in 16th.
Portsmouth topped the list of 25 as the most cost-effective city in the UK.
The survey of 2,500 students across the UK took into account a range of factors including how much students spend on going out to how much time they spend studying.
Edinburgh students pay an average of £112.05 on rent per week, compared to around £110 across the UK.
In Glasgow, the average rental figure was £96.16, while it was £94.49 in Dundee.
The survey found the majority of a student's income came from student loans, which on average were £161.14 per week.
That figure was four times higher than any other source, including part-time work.
After loans, money from students' parents was the largest income source.
Only one in 50 UK students said they took fees, which Scottish students studying in Scotland do not have to pay, into consideration when deciding which university to attend.
Other concerns such as subject choice, university reputation, distance from home and the cost of living were more important for 98% of prospective students.
Dan Jones, Royal Bank of Scotland Head of Student Accounts, said, "Making the most of university can be expensive and there is a massive difference in the costs students face depending on where they choose to study."
The full list of the top 25 most cost-effective cities for students in the UK was:
1 Portsmouth
2 Liverpool
3 Newcastle
4 Belfast
5 Exeter
6 York
7 Cardiff
8 Nottingham
9 Birmingham
10 Dundee
11 Manchester
12 Norwich
13 Leicester
14 Brighton
15 Reading
16 Glasgow
17 Leeds
18 Bristol
19 London
20 Sheffield
21 Plymouth
22 Oxford
23 Cambridge
24 Southampton
25 Edinburgh
Edinburgh is the most expensive city in the UK for students to live and work in, according to a Royal Bank of Scotland survey.