Banks determine the interest rates for loans and savings accounts based on various factors, including loan risk and market competition. The loan risk refers to the probability of a borrower defaulting on their loan, which can affect the interest rate charged by the bank. Banks also consider market competition when determining interest rates to remain competitive in attracting borrowers or depositors. Moreover, banks may adjust interest rates based on changes in economic conditions or monetary policies set by central banks. In summary, banks use analytical tools and market insights to determine interest rates that align with their lending and borrowing objectives while remaining profitable.