Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Tkinter for the desktop interface and the forex-python package for exchange-rate conversion. The example below accepts an amount and two currency codes, converts the amount when you click a button, and displays input or service errors in the window.
What you need
- Python installed in the environment where you will run the program.
- Tkinter available for that Python installation.
- The
forex-pythonpackage installed in the same environment.
Install the package from a terminal with:
python -m pip install forex-python
If your system uses a different Python command, use that command consistently for both installation and running the app. Tkinter is Python’s interface to Tcl/Tk; the official documentation explains that its classes wrap Tcl/Tk commands and recommends Tkinter variables such as StringVar for associating values with widgets: Python 3.14.8 Tkinter documentation.
Build the converter
Save this as currency_converter.py, then run it with Python. Enter standard three-letter currency codes supported by the service, such as USD and INR.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesimport tkinter as tk
from forex_python.converter import CurrencyRates
rates = CurrencyRates()
def convert_currency():
amount_text = amount_var.get().strip()
from_code = from_var.get().strip().upper()
to_code = to_var.get().strip().upper()
try:
amount = float(amount_text)
except ValueError:
result_var.set("Enter a valid number for the amount.")
return
if not from_code or not to_code:
result_var.set("Enter both currency codes.")
return
try:
converted = rates.convert(from_code, to_code, amount)
except Exception as error:
result_var.set(f"Could not convert: {error}")
return
result_var.set(f"{amount:,.2f} {from_code} = {converted:,.2f} {to_code}")
root = tk.Tk()
root.title("Currency Converter")
root.resizable(False, False)
amount_var = tk.StringVar(value="1")
from_var = tk.StringVar(value="USD")
to_var = tk.StringVar(value="INR")
result_var = tk.StringVar(value="Enter an amount and currency codes.")
pad = {"padx": 10, "pady": 6}
tk.Label(root, text="Amount").grid(row=0, column=0, sticky="w", **pad)
tk.Entry(root, textvariable=amount_var, width=24).grid(row=0, column=1, **pad)
tk.Label(root, text="From currency").grid(row=1, column=0, sticky="w", **pad)
tk.Entry(root, textvariable=from_var, width=24).grid(row=1, column=1, **pad)
tk.Label(root, text="To currency").grid(row=2, column=0, sticky="w", **pad)
tk.Entry(root, textvariable=to_var, width=24).grid(row=2, column=1, **pad)
tk.Button(root, text="Convert", command=convert_currency).grid(
row=3, column=0, columnspan=2, pady=8
)
tk.Label(root, textvariable=result_var, wraplength=320, justify="left").grid(
row=4, column=0, columnspan=2, sticky="w", **pad
)
root.mainloop()
How the code works
Connect the interface to Tkinter variables
StringVar instances hold the amount, currency codes, and result text. The entry widgets use textvariable to read and update those values. Tkinter variables wrap Tcl variables, providing a convenient link between a widget and a Python value.
#1 Best Overall
- LARGE EIGHT-DIGIT DISPLAY – Clear and easy-to-read 8-digit display, perfect for everyday calculations and ensuring accurate results in home or office settings.
- TAX & CURRENCY EXCHANGE FUNCTIONS – Effortlessly handle tax calculations and convert home currency to other currencies for easy financial management.
- GENERAL PURPOSE CALCULATOR – Ideal for a wide range of applications, from basic math to business and personal use, with memory keys for quick storage and recall.
- USER-FRIENDLY KEYBOARD – Easy-to-use layout, featuring square root, percent calculation, and simple functions that make it perfect for everyday tasks.
- COMPACT & PORTABLE DESIGN – Space-saving design that fits easily on any desk or in a briefcase, making it ideal for both home and office use.
Validate before making a request
The callback first converts the amount text to a number. If the entry is blank or contains text that cannot be parsed as a float, it updates the result label and returns without calling the service. It also checks that both currency-code fields are nonempty. A nonempty code is not necessarily supported, so service errors are handled separately.
Convert and display the amount
CurrencyRates() creates the client, and convert(from_code, to_code, amount) asks it to convert the entered amount. The try/except around the request keeps a failed request from crashing the interface and puts the error in the result label. The display formats both amounts to two decimal places; that is display rounding, not a change to the rate returned by the package.
Rank #2
- Metric conversions.
- Sized and powered for calculations anywhere.
- Protective wallet case for carry-with convenience.
- Metric converter
- 10-Digits with punctuation
Use a separate rate lookup when you need the rate
If the interface should show the exchange rate itself or apply it using custom logic, call get_rate and multiply the amount:
rate = rates.get_rate(from_code, to_code)
converted = amount * rate
For a simple amount converter, convert is more direct. The package documents both methods and examples at forex-python usage.
Rank #3
- 10 digit large angled LCD display
- Durable plastic keys
- Functions include: currency conversion functions, automatic tax keys, percent key, backspace key, 3 key independent memory, extra-large plus key, sign change, and automatic power down
- Sleek dark blue design
- Opertes on twin power (solar/battery backup)
Choose floating-point or Decimal arithmetic
The example uses the package’s default floating-point behavior, which keeps input handling simple. For monetary arithmetic where decimal representation matters, initialize the client with force_decimal=True and pass a Decimal amount consistently:
from decimal import Decimal
from forex_python.converter import CurrencyRates
rates = CurrencyRates(force_decimal=True)
converted = rates.convert("USD", "INR", Decimal("10.45"))
Do not pass a normal float or integer amount to a client configured this way: the package documentation says mixing those values with Decimal mode raises DecimalFloatMismatchError. See the package’s usage examples and project repository.
Rank #4
- Mr. Pen calculator boasts a 10-digit LCD display that provides crisp and clear number visibility, ensuring accuracy for all your everyday calculations.
- Built with high-quality, durable materials, this calculator is designed for long-lasting use, making it a reliable companion for students, professionals, or home office tasks.
- Featuring large, ergonomic round buttons, it offers a comfortable and responsive touch, allowing for effortless data entry and smooth calculations.
- Its sleek and compact design makes it highly portable, easily fitting into bags, purses, or desk drawers for on-the-go convenience.
- Battery not included
Understand what the displayed conversion means
The result is an informational conversion from the package’s configured rate source, not a guaranteed live quote or a promise of the rate available for a transaction. The package documentation identifies ratesapi.io as its source, while its PyPI description refers to theratesapi.com and rates published by the European Central Bank. Those descriptions differ, so the sources do not establish a current update schedule or service guarantee. Check the package version and its current service behavior before relying on a rate for a time-sensitive use: forex-python on PyPI.
Recommended Free Tools
Quick Recap
Best Value
- Check your calculations thanks to the calculator's inbuilt serial impact roller printer that enables you to monitor your inputs and retains ongoing records. This two-color printer with a four-key memory prints red and black ink at up to 2.3 lines per second onto the included roll of paper.
- Printing calculator offers 12-digit LCD display for convenient viewing. 4-key memory keeps often-used figures accessible for faster calculations. Clock and calendar functions help maintain schedules.
- Easy-to-use solution for all of your basic math needs. Streamline financial calculations with currency conversion, tax calculation, and item counter functions. 1-year manufacturer limited warranty.
- Dimensions: 2.2"H x 6.4"W x 9.1"D. Package content: AC adapter, paper roll, user manual.
- Powered by any standard AC outlet, eliminating the need for expensive batteries. Decimal switch, rounding switch, percent, sign change, backspace, double zero, and grand total functions help you solve a variety of mathematical problems.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

