Compare a private refinance offer with federal plans
compare_refinance_offerGiven an APR and term a lender has offered, returns the refinanced monthly payment and total, compares it with the cheapest federal plan (or with PSLF, which refinancing would end), and lists the federal protections lost. Same math as the studentloan.help calculator. It shows no lender rates of its own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agi | Yes | Borrower's adjusted gross income in dollars per year. | |
| loans | Yes | Each loan: type, balance in dollars and annual interest rate in percent, e.g. [{"type":"direct","balance":38000,"rate_pct":6.39}]. Direct includes Grad PLUS and Direct Consolidation loans. | |
| region | No | Poverty guideline region: contiguous_48_or_dc, alaska or hawaii. | contiguous_48_or_dc |
| employer | No | for_profit (or self-employed), government, nonprofit_501c3 or nonprofit_other. Government and 501(c)(3) add the PSLF projection. | for_profit |
| full_time | No | Works at least 30 hours a week for a qualifying employer (needed for PSLF). | |
| refinance | No | everything (federal and private) or private_only. | everything |
| dependents | No | Dependents claimed; RAP subtracts $50 a month for each. | |
| loan_dates | No | owed_before_2014_07_01 (IBR at 15%), first_loan_2014_to_2026 (IBR at 10%), or loan_on_or_after_2026_07_01 (only RAP and Tiered Standard). | first_loan_2014_to_2026 |
| spouse_agi | No | Spouse's AGI in dollars; counted only when married_joint. | |
| term_years | No | Refinance term in years: 5, 7, 10, 15 or 20. | |
| filing_status | No | single (or head of household), married_joint or married_separate. | single |
| household_size | No | Household size (borrower, spouse, dependents); sets the poverty line for IBR. | |
| offered_apr_pct | Yes | APR the lender actually offered, in percent, e.g. 5.5. | |
| income_growth_pct | No | Assumed yearly income growth in percent (calculator default 3). | |
| poverty_growth_pct | No | Assumed yearly poverty guideline growth in percent (calculator default 2.5). | |
| pslf_payments_made | No | PSLF qualifying payments already counted, 0 to 120. | |
| spouse_federal_loan_balance | No | Spouse's federal loan balance; prorates the payment when married_joint. |