Metadata-Version: 2.4
Name: rate-calculator
Version: 0.1.1
Summary: A small CLI to calculate annualized rates from principal, interest, and days.
Project-URL: Homepage, https://github.com/yushengyangchem/rate-calculator
Project-URL: Issues, https://github.com/yushengyangchem/rate-calculator/issues
Project-URL: Documentation, https://github.com/yushengyangchem/rate-calculator#readme
Author-email: Yusheng Yang <yushengyangchem@gmail.com>
Maintainer-email: Yusheng Yang <yushengyangchem@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: calculator,cli,finance,rate
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

# rate-calculator

`rate-calculator` is a small Python CLI for calculating an annualized rate from:

- principal
- interest earned
- holding days

Formula:

```text
annualized_rate(%) = (interest / principal) / (days / 365) * 100
```

## Installation

```bash
pip install .
```

## Usage

Run with arguments:

```bash
rate-calculator --principal 10000 --interest 150 --days 30
```

Example output:

```text
Annualized rate: 18.25%
```

Print only the numeric result:

```bash
rate-calculator --principal 10000 --interest 150 --days 30 --raw
```

You can also run it interactively:

```bash
rate-calculator
```

## Development

```bash
python -m rate_calculator --principal 10000 --interest 150 --days 30
```

Run tests:

```bash
pytest
```
