Online calculators — financial, health and math API client — calcfyi.com
Project description
calcfyi
Python API client for calcfyi.com -- a collection of 200+ online calculators spanning financial, health, math, and science categories. Access calculator formulas, comparison scenarios, and computation guides through a free REST API, CLI, or MCP server for AI assistants.
CalcFYI provides structured calculator data with underlying formulas, step-by-step explanations, and real-world scenarios -- built for developers, educators, and content creators who need computation reference data.
Try the calculators at calcfyi.com -- financial, health, math, and science calculators with formulas and explanations.
Table of Contents
- Install
- Quick Start
- What You Can Do
- Command-Line Interface
- MCP Server (Claude, Cursor, Windsurf)
- REST API Client
- API Reference
- Learn More About Calculators
- Guide FYI Family
- FYIPedia Developer Tools
- License
Install
pip install calcfyi # Core (zero deps)
pip install "calcfyi[cli]" # + Command-line interface
pip install "calcfyi[mcp]" # + MCP server for AI assistants
pip install "calcfyi[api]" # + HTTP client for calcfyi.com API
pip install "calcfyi[all]" # Everything
Quick Start
from calcfyi.api import CalcFYI
with CalcFYI() as api:
# List available formulas
formulas = api.list_formulas()
# Get a specific formula with explanation
compound_interest = api.get_formula("compound-interest")
# Browse comparison scenarios
scenarios = api.list_scenarios()
# Search across all calculator content
results = api.search("mortgage")
What You Can Do
Financial Calculators
Financial calculators apply time-value-of-money principles to real-world decisions. Compound interest -- the concept of earning interest on interest -- is the foundation of most financial calculations. The compound interest formula A = P(1 + r/n)^(nt) computes future value given principal (P), annual rate (r), compounding frequency (n), and time (t).
| Calculator | Formula | Use Case |
|---|---|---|
| Compound Interest | A = P(1 + r/n)^(nt) | Savings growth, investment returns |
| Mortgage Payment | M = P[r(1+r)^n]/[(1+r)^n-1] | Monthly home loan payments |
| ROI | ROI = (Gain - Cost) / Cost x 100 | Investment performance |
| Break-Even | BEP = Fixed Costs / (Price - Variable Cost) | Business planning |
| Loan Amortization | Declining balance schedule | Debt repayment planning |
| Present Value | PV = FV / (1 + r)^n | Discounted cash flow analysis |
from calcfyi.api import CalcFYI
# Explore financial calculator formulas and explanations
with CalcFYI() as api:
compound = api.get_formula("compound-interest")
print(compound["name"]) # Compound Interest formula details
# Browse guides on financial topics
guides = api.list_guides()
guide = api.get_guide("compound-interest-guide")
Learn more: Browse Calculators · Glossary · Guides
Health and Fitness Calculators
Health calculators provide evidence-based estimates for body composition, nutritional needs, and fitness metrics. BMI (Body Mass Index) -- weight in kg divided by height in meters squared -- is the most widely used screening tool, though it has known limitations for athletes and elderly populations.
| Calculator | Formula | Measures |
|---|---|---|
| BMI | weight(kg) / height(m)^2 | Body mass classification |
| BMR (Mifflin-St Jeor) | 10w + 6.25h - 5a + s | Basal metabolic rate |
| TDEE | BMR x Activity Factor | Total daily energy expenditure |
| Body Fat % | Navy method, skinfold | Body composition estimate |
| Heart Rate Zones | (HRmax - HRrest) x % + HRrest | Training intensity targets |
| Macros | TDEE split by P/C/F ratios | Daily macronutrient targets |
from calcfyi.api import CalcFYI
# Explore health and fitness calculator formulas
with CalcFYI() as api:
bmi = api.get_formula("bmi")
bmr = api.get_formula("bmr-mifflin-st-jeor")
# Access glossary terms for health terminology
glossary = api.list_glossary()
term = api.get_term("basal-metabolic-rate")
Learn more: Health Calculators · Glossary · API Docs
Math and Science Formulas
Mathematical and scientific calculators cover geometry, trigonometry, statistics, physics, and chemistry. Each formula includes derivation context, variable definitions, and practical application examples.
| Category | Examples | Key Formulas |
|---|---|---|
| Geometry | Area, volume, surface area | Circle: A = pir^2, Sphere: V = 4/3pi*r^3 |
| Statistics | Mean, std dev, z-score | z = (x - mu) / sigma |
| Physics | Force, energy, velocity | F = ma, E = mc^2, KE = 1/2*mv^2 |
| Chemistry | Molarity, dilution, pH | pH = -log[H+], M1V1 = M2V2 |
| Conversion | Temperature, units | C = (F - 32) x 5/9 |
from calcfyi.api import CalcFYI
# Explore math and science formulas
with CalcFYI() as api:
formulas = api.list_formulas()
# Browse comparison scenarios between different approaches
comparisons = api.list_comparisons()
comparison = api.get_comparison("simple-vs-compound-interest")
Learn more: Browse Formulas · Comparisons · Guides
Comparison Scenarios
Calculator comparisons show side-by-side results for different inputs or methods. For example, comparing simple interest vs compound interest over 10 years, or comparing BMI vs body fat percentage for the same individual. These scenarios help users understand when and why different formulas apply.
from calcfyi.api import CalcFYI
# Explore comparison scenarios
with CalcFYI() as api:
scenarios = api.list_scenarios()
scenario = api.get_scenario("renting-vs-buying")
# Browse FAQs about calculator usage
faqs = api.list_faqs()
Learn more: Scenarios · FAQs · Glossary
Command-Line Interface
pip install "calcfyi[cli]"
# Search for calculators
calcfyi search "compound interest"
# Output is JSON for easy piping
calcfyi search "BMI" | jq '.results[0]'
MCP Server (Claude, Cursor, Windsurf)
Add calculator data tools to any AI assistant that supports Model Context Protocol.
pip install "calcfyi[mcp]"
Add to your claude_desktop_config.json:
{
"mcpServers": {
"calcfyi": {
"command": "python",
"args": ["-m", "calcfyi.mcp_server"]
}
}
}
Available tools: search_calcfyi
REST API Client
from calcfyi.api import CalcFYI
with CalcFYI() as api:
# List endpoints
formulas = api.list_formulas()
comparisons = api.list_comparisons()
scenarios = api.list_scenarios()
glossary = api.list_glossary()
guides = api.list_guides()
# Detail endpoints
formula = api.get_formula("compound-interest")
guide = api.get_guide("financial-formulas")
# Search
results = api.search("mortgage calculator")
API Reference
| Method | Description |
|---|---|
list_formulas(**params) |
List all calculator formulas |
get_formula(slug) |
Get formula detail |
list_comparisons(**params) |
List all comparisons |
get_comparison(slug) |
Get comparison detail |
list_scenarios(**params) |
List all scenarios |
get_scenario(slug) |
Get scenario detail |
list_glossary(**params) |
List glossary terms |
get_term(slug) |
Get glossary term detail |
list_guides(**params) |
List all guides |
get_guide(slug) |
Get guide detail |
list_faqs(**params) |
List all FAQs |
get_faq(slug) |
Get FAQ detail |
search(query) |
Search across all content |
Full API documentation at calcfyi.com/developers/.
Learn More About Calculators
- Browse: Calculators · Formulas · Comparisons
- Guides: Glossary · Guides
- API: REST API Docs · OpenAPI Spec
Guide FYI Family
Part of the FYIPedia open-source developer tools ecosystem -- life reference guides, calculators, education, and games.
| Package | PyPI | Description |
|---|---|---|
| calcfyi | PyPI | 200+ calculators, financial, health, math -- calcfyi.com |
| salaryfyi | PyPI | Salary comparison, tax calculators, 36 countries -- salaryfyi.com |
| univfyi | PyPI | University rankings, programs, admissions -- univfyi.com |
| boardgamefyi | PyPI | Board games, rules, reviews, recommendations -- boardgamefyi.com |
FYIPedia Developer Tools
| Package | PyPI | npm | Description |
|---|---|---|---|
| colorfyi | PyPI | npm | Color conversion, WCAG contrast, harmonies -- colorfyi.com |
| emojifyi | PyPI | npm | Emoji encoding & metadata -- emojifyi.com |
| symbolfyi | PyPI | npm | Symbol encoding in 11 formats -- symbolfyi.com |
| unicodefyi | PyPI | npm | Unicode lookup with 17 encodings -- unicodefyi.com |
| fontfyi | PyPI | npm | Google Fonts metadata & CSS -- fontfyi.com |
| distancefyi | PyPI | npm | Haversine distance & travel times -- distancefyi.com |
| timefyi | PyPI | npm | Timezone ops & business hours -- timefyi.com |
| namefyi | PyPI | npm | Korean romanization & Five Elements -- namefyi.com |
| unitfyi | PyPI | npm | Unit conversion, 220 units -- unitfyi.com |
| holidayfyi | PyPI | npm | Holiday dates & Easter calculation -- holidayfyi.com |
| calcfyi | PyPI | -- | 200+ calculators, financial, health, math -- calcfyi.com |
| cocktailfyi | PyPI | -- | Cocktail ABV, calories, flavor -- cocktailfyi.com |
| fyipedia | PyPI | -- | Unified CLI for all FYI tools -- fyipedia.com |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file calcfyi-0.1.1.tar.gz.
File metadata
- Download URL: calcfyi-0.1.1.tar.gz
- Upload date:
- Size: 464.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fcf6cde9420de79325e12e041713487a01cda5258badd41ac6a5f6315ce0672
|
|
| MD5 |
dcf91633224ff2f6108f090ed6fa099d
|
|
| BLAKE2b-256 |
419eccf2579b5b8404489f6549072a83baca9bbe5427895d9cf63010c7d1a858
|
File details
Details for the file calcfyi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: calcfyi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19aacb465aae84525ea0490ed35a002a36770c30be864ff94272da3f2c245d35
|
|
| MD5 |
a2871166f6167cd038282acd2a52af5c
|
|
| BLAKE2b-256 |
c05f2c36f859e0eaeed029cbbbb30dfda701471b58a2b43b2b62098acfede424
|