Motorrijtuigenbelasting is a Python library designed to calculate Dutch road taxes (motorrijtuigenbelasting, MRB) for passenger cars, motorcycles, and other vehicle types. It provides tools for determining taxes based on weight, fuel type, and provincial rates between 2015 and 2024. Future years will be added once the inflation numbers are in from the Belastingdienst.
- Support for multiple energy sources (benzine, diesel, LPG, electric, etc.)
- Handles tax calculations based on weight brackets and provincial multipliers.
- Adjustable tax parameters for future tax years.
- Lightweight and extensible for different vehicle types like cars and motorcycles.
- Python 3.7 or higher.
pip install motorrijtuigenbelasting
or clone the repository and install dependencies:
git clone https://github.com/VitoMinheere/motorrijtuigenbelasting.git
cd motorrijtuigenbelasting
pip install -r requirements.txt
Here’s how to use MRB-Py to calculate road tax for a passenger car:
from motorrijtuigenbelasting import Car, EnergySource
# Define car details
car = Car(weight=1200, energy_source=EnergySource.BENZINE, manufacturing_year=2024)
# Calculate total tax for Noord-Holland province in 2024
province = "noord-holland"
year = 2024
tax = car.calculate_total_tax(province=province, year=year)
print(f"Total tax for your car: €{tax}")
Supports fuel types like benzine, diesel, LPG, LPG G3, and electric vehicles.
Added the oldtimer & kwarttarief rulings and their maximum amounts.
Rules for base tax and opcenten added. Added sources to the information in the docstring.
Other vehicles types are being worked on in the following order:
- Diesel
- Benzine with low emissions
- Business Van
- Camper
- Trucks
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Write clear code and include tests.
- Submit a pull request with a detailed description of your changes.
Found a bug or have an idea for a new feature? We’d love to hear from you!
- Go to the Issues tab of the repository.
- Click New Issue.
- Provide a detailed description, including steps to reproduce the issue or a clear explanation of your feature idea.
Use unittest
to run tests:
python -m unittest discover -s tests
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to reach out for support or feedback: