Why every forex calculation starts with reading the quote correctly
Before you can work out a pip value, a position size, a margin requirement or a profit and loss figure, you have to read one line correctly: a currency quote such as EUR/USD 1.1036 / 1.1038. It looks simple, yet most errors in FX spreadsheets come from exactly this step. People mix up which currency they are buying, they use four decimals for a yen pair, or they calculate profit from the mid price when the trade was actually filled at the bid or the ask. One wrong assumption in the first column and every later number in the sheet inherits it.
This free first lesson is for anyone who wants to understand the arithmetic behind currency trading: students of finance or economics, people who have opened a demo account and want to know what the numbers on the screen really mean, analysts who need to cost a currency conversion, and Excel users who simply like to check things themselves. You do not need any trading experience. You need a spreadsheet, the lab above and about fifteen minutes.
Throughout the course we follow Rhea Novak, a fictional learner with a USD 10,000 practice account. All prices are invented for practice. This course is strictly educational: it is not investment advice, it does not recommend buying or selling any currency, and nothing in it suggests that trading will make money. Leveraged FX trading can lose money quickly, and with leverage it is possible to lose more than the deposit. The goal here is to understand the math so you can judge risks and costs clearly.
Base currency and quote currency
A currency pair prices one currency in terms of another. In EUR/USD = 1.1037 the first currency, EUR, is the base currency and the second, USD, is the quote currency (also called the counter currency). The number tells you how many units of the quote currency one unit of the base currency costs: one euro costs 1.1037 US dollars. If the number rises to 1.1100, the euro has become more expensive in dollars, or equivalently the dollar has become cheaper in euros.
When you buy a pair you buy the base currency and pay with the quote currency. Buying EUR/USD means receiving euros and paying dollars. Selling a pair means the opposite: you give up the base currency and receive the quote currency. In USD/JPY the base is the dollar, so buying USD/JPY means buying dollars and paying with yen. This is why the order of the letters matters: USD/JPY and JPY/USD describe the same exchange rate, but one is the reciprocal of the other, and the base currency decides what "buy" means.
Currency codes follow the ISO 4217 standard and always have three letters, for example EUR, USD, GBP, JPY, CHF and AUD. That fixed length is what makes the Excel side easy: =LEFT(A4,3) returns the first three characters of the pair name (the base) and =RIGHT(A4,3) returns the last three (the quote). The slash in the middle is ignored automatically. If your data source writes pairs without a slash, such as "EURUSD", LEFT and RIGHT still work, and =MID(A4,4,3) is a useful alternative for the quote currency.
Bid, ask, spread and mid price
A broker or bank never shows just one price. It shows two. The bid is the price at which it will buy the base currency from you, so it is the price you receive when you sell. The ask (or offer) is the price at which it will sell the base currency to you, so it is the price you pay when you buy. The ask is always higher than the bid. The gap between them is the spread, and it is the most basic trading cost: if you buy at the ask and immediately sell at the bid, you lose exactly the spread.
The mid price is the average of bid and ask: =(D4+E4)/2. It is the price you see in news headlines and on charts, and it is useful for valuing positions and comparing quotes. You cannot normally trade at the mid, though. A spreadsheet that values a fresh purchase at the mid will look slightly better than reality, because the trade was filled at the ask. The figure below puts all three prices for EUR/USD from the lab on one ladder.
What a pip is, and why yen pairs are different
A pip (often explained as "percentage in point") is the standard unit for price changes in FX. For most pairs a pip is the fourth decimal place, 0.0001. When EUR/USD moves from 1.1036 to 1.1046, it has moved 10 pips. Pairs quoted in Japanese yen have only two meaningful decimals because one yen is a small amount of money, so for them a pip is 0.01. When USD/JPY moves from 148.62 to 148.72, it has also moved 10 pips.
Many brokers show one more decimal than the pip, for example EUR/USD 1.10365. That extra digit is a fractional pip, often called a pipette, and it is one tenth of a pip. It does not change the definition: a spread of 0.00017 is 1.7 pips. In the lab all prices use the classic four (or two) decimals, so every spread is a whole number of pips.
The rule for spreadsheets is therefore: pip size = 0.01 if the quote currency is JPY, otherwise 0.0001, and spread in pips = (ask − bid) / pip size. Because the pip size depends on the quote currency, it is cleanest to calculate it once in its own column with =IF(C4="JPY",0.01,0.0001) and then refer to that column everywhere else. If you later add a pair with another convention, you change one rule instead of hunting through dozens of formulas.
Worked example: Rhea's six currency pairs
Rhea copies six invented quotes into her sheet and wants the base currency, quote currency, pip size, spread in pips and mid price for each one. The table below shows the finished result. The last column is an extra that is not in the lab: the spread as a percentage of the mid price, which lets you compare costs across pairs fairly.
| Pair | Base | Quote | Bid | Ask | Pip size | Spread (pips) | Mid | Spread % of mid |
|---|---|---|---|---|---|---|---|---|
| EUR/USD | EUR | USD | 1.1036 | 1.1038 | 0.0001 | 2 | 1.10370 | 0.0181% |
| GBP/USD | GBP | USD | 1.3124 | 1.3127 | 0.0001 | 3 | 1.31255 | 0.0229% |
| USD/JPY | USD | JPY | 148.62 | 148.65 | 0.01 | 3 | 148.635 | 0.0202% |
| USD/CHF | USD | CHF | 0.8417 | 0.8420 | 0.0001 | 3 | 0.84185 | 0.0356% |
| AUD/USD | AUD | USD | 0.6553 | 0.6555 | 0.0001 | 2 | 0.65540 | 0.0305% |
| EUR/JPY | EUR | JPY | 164.03 | 164.08 | 0.01 | 5 | 164.055 | 0.0305% |
These are the formulas behind the table. Each one is typed once in row 4 and copied down to row 9. All references are relative, so the row number adjusts automatically as the formula is copied.
| Cell | Formula (row 4, copy down to row 9) | Result for EUR/USD |
|---|---|---|
| B4 | =LEFT(A4,3) | EUR |
| C4 | =RIGHT(A4,3) | USD |
| F4 | =IF(C4="JPY",0.01,0.0001) | 0.0001 |
| G4 | =(E4-D4)/F4 or safer =ROUND((E4-D4)/F4,1) | 2 |
| H4 | =(D4+E4)/2 or =AVERAGE(D4:E4) | 1.10370 |
| I4 (extra) | =(E4-D4)/H4, formatted as % with 4 decimals | 0.0181% |
Three observations come straight out of the numbers. First, the yen pairs have spreads of 3 and 5 pips, but they are measured in hundredths of a yen, not in ten-thousandths of a dollar. Second, a spread of 3 pips on USD/CHF is a larger share of the price than 3 pips on GBP/USD, because a Swiss franc is "worth" fewer dollars than a pound. Third, the cheapest pair in percentage terms is EUR/USD, and the most expensive in this invented set is USD/CHF. Counting pips alone would have pointed you to EUR/USD and AUD/USD as equally cheap, which is not quite right.
What the spread costs in money
Pips become money once you know the trade size. In FX the size is counted in units of the base currency. A standard lot is 100,000 units, a mini lot 10,000 and a micro lot 1,000. For a pair quoted in US dollars, one pip on 10,000 units is worth 10,000 × 0.0001 = 1 USD. The table below follows a 10,000-unit round trip in EUR/USD with the lab prices, for example to see what the spread alone costs.
| Step | EUR/USD, 10,000 units (example) | Result |
|---|---|---|
| Buy 10,000 EUR at the ask | 10,000 × 1.1038 | you pay 11,038.00 USD |
| Sell them back at once at the bid | 10,000 × 1.1036 | you receive 11,036.00 USD |
| Round-trip cost | 11,038.00 − 11,036.00 | 2.00 USD = 2 pips × 1.00 USD per pip |
| Price must rise before you break even | bid must reach 1.1038 | +2 pips |
The same logic holds for a yen pair, but the result first comes out in yen. On USD/JPY the spread is 0.03 yen per dollar, so 10,000 units cost 300 yen to enter and leave, which is roughly 2.02 USD at the mid of 148.635. Converting pip values into your account currency is exactly what lesson 2 of this course is about. For now, remember the key idea: the spread is a cost you pay on every trade, and a new position starts with a small loss equal to the spread.
Step by step: building the quote sheet in Excel
- Open the lab above, or a blank workbook. Put headers in row 3: Pair, Base, Quote, Bid, Ask, Pip size, Spread (pips), Mid.
- Type the pair names in A4:A9 exactly as "EUR/USD" with three letters, a slash and three letters. Type the bid prices in column D and the ask prices in column E.
- In B4 type
=LEFT(A4,3)and press Enter. Select B4:B9 and press Ctrl+D (Cmd+D on a Mac) to fill down. Do the same with=RIGHT(A4,3)in C4:C9. - Select F4:F9, type
=IF(C4="JPY",0.01,0.0001)and press Ctrl+Enter. Excel enters the formula into every selected cell, adjusting the row each time. - In G4 type
=ROUND((E4-D4)/F4,1)and fill down. The ROUND keeps results such as 1.9999999999 from appearing as "2" but failing a comparison like=G4=2. - In H4 type
=(D4+E4)/2and fill down. Format H4:H9 with Ctrl+1 → Number → Decimal places: 5 for the dollar pairs and 3 for the yen pairs, so the half pip in GBP/USD stays visible. - Optional: add "Spread %" in I3 and
=(E4-D4)/H4in I4:I9, formatted via Home → Number → Percent Style with 4 decimals. - To build Figure 2 yourself, select A3:A9, hold Ctrl and add G3:G9, then choose Insert → Charts → Clustered Column. Check the result: no spread should be negative, and the yen pairs should show sensible whole numbers.
- Press Ctrl+` to show all formulas at once and compare each column with the table above. Press it again to return to the results.
=VALUE(D4) converts it.
Common mistakes and how to spot them
- Swapping base and quote. RIGHT returns the quote, LEFT the base. A quick check: in USD/JPY the base must be USD. If your base column shows JPY there, the formulas are reversed.
- Using 0.0001 for yen pairs. The spread on EUR/JPY would show 500 pips instead of 5. Any spread in the hundreds for a liquid pair is a red flag.
- Subtracting in the wrong order. Bid minus ask gives a negative spread. The spread is always ask − bid and always positive. Add
=MIN(G4:G9)>0as a check cell. - Valuing trades at the mid. A buy is filled at the ask and a sell at the bid. Using the mid for both hides the spread and makes every result look better than it was.
- Comparing pips across pairs. 3 pips on USD/CHF and 3 pips on GBP/USD are not the same cost. Compare spreads as a percentage of the mid, or in account currency.
- Rounding the display instead of the value. A cell formatted with 0 decimals can show 2 while it holds 1.9999999. Use ROUND in the formula when you compare or look up values.
- Reading a quote with a fifth decimal as pips. 1.10365 − 1.10348 is 1.7 pips, not 17. Count the decimals before you divide.
Quick reference: functions and shortcuts used in this lesson
| Function or shortcut | What it does here | Example |
|---|---|---|
LEFT(text, n) | first n characters: the base currency | =LEFT(A4,3) → EUR |
RIGHT(text, n) | last n characters: the quote currency | =RIGHT(A4,3) → USD |
MID(text, start, n) | characters from the middle, works even for "EURUSD" | =MID("EURUSD",4,3) → USD |
IF(test, yes, no) | chooses the pip size | =IF(C4="JPY",0.01,0.0001) |
AVERAGE(range) | mid price of bid and ask | =AVERAGE(D4:E4) |
ROUND(number, digits) | removes floating-point noise from pip counts | =ROUND((E4-D4)/F4,1) |
| Ctrl+D (Cmd+D on Mac) | fill a formula down a selected range | select B4:B9, press Ctrl+D |
| Ctrl+Enter | enter one formula into every selected cell at once | select F4:F9, type, Ctrl+Enter |
| Ctrl+1 (Cmd+1) | Format Cells: set 4 or 5 decimals, or % | Number → Decimal places: 5 |
| Ctrl+` (grave accent) | show formulas instead of results to audit the sheet | toggle on, check, toggle off |
Real-world uses of these calculations
- Comparing costs between providers. If two brokers or banks quote the same pair, the spread in pips and as a share of the mid tells you which one charges less for the same transaction.
- Business currency conversion. A company paying a supplier in euros can compare the rate its bank offers with the mid rate and see the hidden margin in pips and in money, for example on a 50,000 EUR payment.
- Travel and personal transfers. The same arithmetic shows how much a money transfer service or a card provider charges compared with the mid rate.
- Cleaning a price feed. Analysts who download quote data use LEFT, RIGHT and the pip rule to split pairs, flag negative or implausibly wide spreads and build tidy tables for further analysis.
- Exam and interview preparation. Questions about base and quote currencies, bid and ask, and pip counts appear in many finance courses. A sheet that does it correctly is a good way to check your own answers.
What you will build in the rest of this course
This first lesson is free. Lessons 2 to 20 are part of the full course, which costs a one-time $9.90 and comes with a hands-on lab in every lesson. Each one builds on Rhea's practice account and the quote sheet you just made.
Pip Value per Lot & Conversion to USD. You turn pips into money for standard, mini and micro lots, and convert pip values from yen, Swiss francs or other quote currencies into the account currency, the step most beginners get wrong.
Profit & Loss of FX Trades in Pips and Dollars. You calculate the result of long and short trades from entry and exit prices, using the correct side of the quote, and see how the spread affects every trade.
Leverage, Margin & Margin Level. You work out how much margin a position ties up, what the effective leverage is and how a margin level is calculated, so you can see exactly how quickly losses eat into a small account.
Position Sizing from Risk % and Stop-Loss. You build the classic sizing formula: from a chosen risk per trade and a stop distance in pips to a position size in units, one of the most useful risk-control calculations there is.
Risk-Reward Ratio & Break-Even Win Rate. You link the distance to stop and target with the share of trades that would need to work just to cover losses and costs, and see why a high ratio alone guarantees nothing.
Cross Rates & the Triangular Check. You derive EUR/JPY from EUR/USD and USD/JPY, handle bid and ask correctly in the cross, and check a set of quotes for consistency.
Swap Costs, Trade Journal & Expectancy. You add overnight financing costs, keep a structured journal and calculate the expectancy of a series of invented trades, the honest summary of what a set of rules did on paper.
Summary
A currency quote names a base and a quote currency, and the number says how much of the quote currency buys one unit of the base. Buyers pay the ask, sellers receive the bid, and the spread between them is a cost on every trade. A pip is 0.0001 for most pairs and 0.01 for yen pairs, so the pip size belongs in its own column, and spreads should be compared as a share of the mid price rather than in raw pips. With LEFT, RIGHT, IF, a subtraction and an average you can turn any list of quotes into a clean, checkable table.
Frequently asked questions
What is the difference between the base and the quote currency?
The base currency is the first one in the pair and the quote currency is the second. The price tells you how many units of the quote currency one unit of the base currency costs, so EUR/USD 1.10 means one euro costs 1.10 US dollars.
How many pips is a move from 1.1036 to 1.1046?
For a pair like EUR/USD a pip is 0.0001, so the move of 0.0010 is 10 pips. For a yen pair a pip is 0.01, so 148.62 to 148.72 is also 10 pips.
Why is a pip 0.01 for yen pairs?
One Japanese yen is a small amount compared with a dollar or a euro, so yen pairs are quoted with only two meaningful decimals. The standard price step is therefore the second decimal, 0.01.
How do I calculate the spread in pips in Excel?
Subtract the bid from the ask and divide by the pip size, for example =(E4-D4)/F4 with the pip size in F4. Wrapping it in ROUND, such as =ROUND((E4-D4)/F4,1), removes tiny floating-point errors.
Do I buy at the bid or the ask?
You buy at the ask, the higher price, and sell at the bid, the lower price. That is why a newly opened position starts with a small loss equal to the spread.
What is a pipette or fractional pip?
Many platforms show a fifth decimal for most pairs (or a third for yen pairs). That extra digit is one tenth of a pip, so 1.10365 minus 1.10348 is 1.7 pips.
Keep going: Forex Trading Math & Risk Management
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time CHF 9.90.
- Pip Value per Lot & Conversion to USD
- Profit & Loss of FX Trades in Pips and Dollars
- Leverage, Margin & Margin Level
- Position Sizing from Risk % and Stop-Loss
- Risk-Reward Ratio & Break-Even Win Rate
- Cross Rates & the Triangular Check
- Swap Costs, Trade Journal & Expectancy
- All-In Trading Costs: Spread, Commission & Slippage
- Scaling In and Out: Average Entry, Partial Closes & Break-Even Price
- Net Currency Exposure Across Open Positions
- When the Account Is Not in USD: Pip Values and P&L in Swiss Francs
- Volatility-Based Stops: ATR Multiples and Equal-Risk Sizing
- Open Risk & Portfolio Heat Across Several Trades
- Trailing Stops: Ratcheting the Stop and Locking In Profit
- Equity Curve, Drawdown & the Math of Recovery
- Losing Streaks & Fixed-Fractional Risk
- R-Multiples, Profit Factor & a 20-Trade Review
- Monthly Returns with Deposits and Withdrawals, Compounded
- Final Project: Pre-Trade Risk Dashboard for the Trading Week