Currency Handling and Double Entry Bookkeeping

A Double Entry bookkeeping system stores both values, and requires that all transactions balance, as described in the Double Entry Identity.

When we introduce the notion of having multiple currencies, or stocks that may vary in price, the identities get a little more complicated, and we introduce the following formulae:

Thus, buying a widget in Japan (JPY) and using US Dollars (USD) to pay for it would appear thus:

The engine links together all three of these values (1.0, 150, 0.00667) permanently and makes it impossible to change one without changing another, so that the grand total is always zero, thereby guaranteeing satisfaction of the double entry accounting identity.

How to set up a foreign-currency account

All of the above may sound straightforward, but you may get stumped when you first try to represent some foreign money. Let's demonstrate how you'd go about setting up an account to represent, say, French Francs.

Let's say you have an account that holds cash in US dollars, and it has $1,000 in it. You want to buy about $100 worth of Francs, and naturally you'd like to represent those Francs in their own account. Here's what you need to do:

  1. Create a new account (name it "Francs") of type Cash, with a currency of FRF (that's the ISO code for French Francs; see ISO Currency Codes, below).
  2. Create another account (name it "Trading"), of type Currency, with a currency of USD, and a security of FRF. This account will represent trades between the two currencies, or to be more precise, purchases of Francs with dollars.
  3. Now open the "Trading" account, and enter a transaction that transfers from your cash account. Put 555 in the "Bought" column, and .18 in the Price column. You've now bought 555 Francs for $0.18 apiece.
  4. Last step: transfer the $99.90 that is now in your trading account into the "Francs" account. Note that you could not have transferred anything directly from cash to Francs (try it); those two accounts do not have a currency in common.

A few unpleasant things you may have noticed about the above procedure:

Notwithstanding the above unpleasantness, this is how you deal with foreign currencies in GnuCash. The key is that you need a trading account whose Security field names a different currency than its Currency field, and your trades must go "through" this trading account.

ISO Currency Codes

More currencies than you thought possible...

ISO Code Full Description
ADP Andoran peseta
AED United Arab Emirates Dirham
AFA Afghani
ALL Albanian Lek
AMD Armenian Dram
ANG West Indian Guilder
AOK Angolan Kwanza
ARA Argentinian Austral
ARS Argentina Peso
ATS Austrian Schilling
AUD Australian Dollar
AWG Aruban Guilder
AZM Azerbaijan Manat
BAD Bosnia-Herzogovinian Dinar
BBD Barbados Dollar
BDT Bangladesh Taka
BEF Belgian Franc
BGL Bulgarian Lev
BHD Bahrain Dinar
BIF Burundi Franc
BMD Bermudan Dollar
BND Brunei Dollar
BOB Bolivian Boliviano
BRL Brazilian Real
BRR Brazil
BSD Bahaman Dollar
BWP Botswana Pula
BYR Belorussian Ruble
BZD Belize Dollar
CAD Canadian Dollar
CDP Santo Domiongo
CHF Swiss Franc
CLP CHILEAN PESO
CNY China
COP Colombian Peso
CRC Costa Rica Colon
CUP Cuban Peso
CVE Cape Verde Escudo
CYP Cyprus Pound
CZK Czech Krona
DEM German Mark
DJF Djibouti Franc
DKK Danish Krone
DOP Dominican Peso
DRP Dominican Republic Peso
DZD Algerian Dinar
ECS ECUADORIAN SUCRE
ECS Ecuador Sucre
ECU European Currency Unit
EEK Estonian Krone
EGP Egyptian Pound
ESP Spanish Peseta
ETB Ethiopian Birr
EUR Currency of EMU member states
FIM Finnish Mark
FJD Fiji Dollar
FKP Falkland Pound
FRF French Franc
GBP British Pound
GEK Georgian Kupon
GHC Ghanian Cedi
GIP Gibraltar Pound
GMD Gambian Dalasi
GNF Guinea Franc
GRD Greek Drachma
GTQ Guatemalan Quedzal
GWP Guinea Peso
GYD Guyanese Dollar
HKD Hong Kong Dollar
HNL Honduran Lempira
HRD Croatian Dinar
HTG Haitian Gourde
HUF Hungarian forint
IDR Indeonesian Rupiah
IEP Irish Pound
ILS Israeli Scheckel
INR Indian Rupee
IQD Iraqui Dinar
IRR Iranian Rial
ISK Iceland Krona
ITL Italian Lira
JMD JAMAICAN DOLLAR
JOD Jordanian Dinar
JPY Japanese Yen
KES Kenyan Shilling
KHR Cambodian Riel
KIS Kirghizstan Som
KMF Comoros Franc
KPW North Korean Won
KRW South Korean Won
KWD Kuwaiti Dinar
KYD Cayman Dollar
KZT Kazakhstani Tenge
LAK Laotian Kip
LBP Lebanese Pound
LKR Sri Lankan Rupee
LRD Liberian Dollar
LSL Lesotho Loti
LTL Lithuanian Lita
LUF Luxembourgian Franc
LVL Latvian Lat
LYD Libyan Dinar
MAD Moroccan Dirham
MDL Moldavian Lei
MGF Madagascan Franc
MNC Monaco
MNT Mongolian Tugrik
MOP Macao Pataca
MRO Mauritanian Ouguiya
MTL Maltese Lira
MUR Mauritius Rupee
MVR Maldive Rufiyaa
MWK Malawi Kwacha
MXN Mexican Peso (new)
MXP Mexican Peso (old)
MYR Malaysian Ringgit
MZM Mozambique Metical
NGN Nigerian Naira
NIC Nicaragua
NIO Nicaraguan Cordoba
NIS Isreal
NLG Dutch Guilder
NOK Norwegian Krone
NPR Nepalese Rupee
NZD New Zealand Dollars
OMR Omani Rial
PAB Panamanian Balboa
PEI Peruvian Inti
PEN Peruvian Sol - New
PES Peruvian Sol
PGK Papua New Guinea Kina
PHP Philippino Peso
PKR Pakistan Rupee
PLN Polish Zloty
PLZ Poland
PTE Portuguese Escudo
PYG Paraguayan Guarani
QAR Qatar Riyal
RMB Chinese Renminbi Yuan
ROL Roumanian Lei
RUR Russian Rouble
RWF Rwanda Franc
SAR Saudi Riyal
SBD Solomon Islands Dollar
SCR Seychelles Rupee
SDP Sudanese Pound
SEK Swedish Krona
SGD Singapore Dollar
SHP St.Helena Pound
SIT Slovenian Tolar
SKK Slovakian Krona
SLL Leone
SOL Peru
SOS Somalian Shilling
SRG Surinam Guilder
STD Sao Tome / Principe Dobra
SUR Russian Ruble (old)
SVC El Salvador Colon
SYP Syrian Pound
SZL Swaziland Lilangeni
THB Thailand Baht
TJR Tadzhikistani Ruble
TMM Turkmenistani Manat
TND Tunisian Dinar
TOP Tongan Pa'anga
TPE Timor Escudo
TRL Turkish Lira
TTD Trinidad and Tobago Dollar
TWD New Taiwan Dollar
TZS Tanzanian Shilling
UAK Ukrainian Karbowanez
UGS Ugandan Shilling
USD American Dollar
UYP Uruguayan New Peso
UYU Uruguay
VEB Venezuelan Bolivar
VND Vietnamese Dong
VUV Vanuatu Vatu
WST Samoan Tala
XAF Gabon C.f.A Franc
XCD East Carribean Dollar
XOF Benin C.f.A. Franc
YER Yemeni Ryal
ZAR South African Rand
ZMK Zambian Kwacha
ZRZ Zaire
ZWD Zimbabwean Dollar

Return to Main Documentation Page.