One way that investors borrow funds from brokerages is through margin accounts; it is these interest charges that allow them to charge such low commission rates.
How do we calculate the interest charges? Well, each brokerage has a different method of calculation, so you should speak to your broker directly. However, you should use this formula as a general rule:
(Interest Rate/365 Days)*(Amount Being Borrowed)*(Number of Days Borrowing Funds)
The easiest way to find out how much you have borrowed is to take the equity in your account and subtract it by the market value. If you have a negative amount, this will be the amount you owe. If it is equal to zero, then you owe nothing, and if it is positive, you will have cash that you should invest somewhere else or take out of the margin account as it generally doesn't pay much interest.
Once again, this is a general approach and does not necessarily reflect the policy of all brokerages. If you want to find out the exact calculations, you're going to have to give them a call.
For further reading on this subject, see our tutorial on Margin Trading.

What happens if I cannot pay a margin call?
Minimum margin is the amount of funds that must be deposited with a broker by a margin account customer. With a margin account, ... Read Answer >> 
What is a margin account?
A margin account is an account offered by brokerages that allows investors to borrow money to buy securities. An investor ... Read Answer >> 
How is margin interest calculated?
Before running a calculation you must first find out what rate your brokerdealer is charging to borrow money. The broker ... Read Answer >>

Trading
Introduction to Margin Accounts
Find out what your broker is doing with your securities when you invest on margin. 
Investing
Opening Your First Brokerage Account
Learn what steps you should take before you open your first brokerage account. 
Financial Advisor
Margin Investing Gets A Bad Rap, But For The ThrillSeeker, It's Worth It
Investing on margin can be profitable but it's a risky play that needs care. 
Investing
What's a Brokerage Account?
A brokerage account is a contractual arrangement between an investor and a licensed securities broker or brokerage. 
Financial Advisor
Don't Let Brokerage Fees Undermine Your Returns
Smart investors don't give away more money than necessary in commissions and fees. Find out how to save. 
Trading
Pick the Right Brokerage Account for Options Trading
Follow these steps to pick the right options brokerage account depending on your trading needs and style of trading. 
Trading
10 Tips For Choosing An Online Broker
This important investment decision happens before you pick your first stock. Find out how to get it right. 
Investing
Buying on Margin
When an investor buys on margin, he or she pays a portion of the stock price – called the margin  and borrows the rest from a stockbroker. The purchased stocks then serve as collateral for ...

Margin Account
A brokerage account in which the broker lends the customer cash ... 
Brokerage Company
A business whose main responsibility is to be an intermediary ... 
Buying Power
The money an investor has available to buy securities. In a margin ... 
Brokerage Account
An arrangement between an investor and a licensed brokerage firm ... 
Margin Call
A broker's demand on an investor using margin to deposit additional ... 
Interest Rate
The amount charged, expressed as a percentage of principal, by ...