MortgageUtils 1.0.0

dotnet add package MortgageUtils --version 1.0.0
                    
NuGet\Install-Package MortgageUtils -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MortgageUtils" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MortgageUtils" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MortgageUtils" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MortgageUtils --version 1.0.0
                    
#r "nuget: MortgageUtils, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MortgageUtils@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MortgageUtils&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MortgageUtils&version=1.0.0
                    
Install as a Cake Tool

MortgageUtils

A .NET library for US mortgage calculations and educational borrower screening.

Built by OurNetHelps.com, mortgage technology tools for US mortgage brokers.

Educational use only. This library provides simplified calculation utilities and screening estimates. It does not determine mortgage approval, eligibility, or underwriting outcomes. Actual underwriting requirements vary by lender, loan program, automated underwriting system, and borrower circumstances.

Installation

dotnet add package MortgageUtils

Usage

DTI Calculation

using MortgageUtils;

// Conventional DTI (28% front-end / 45% back-end modeled thresholds)
var dti = MortgageCalculator.CalculateDTI(
    grossMonthlyIncome: 6000,
    monthlyHousingCost: 1500,
    otherMonthlyDebts: 600
);

Console.WriteLine($"Front-end DTI: {dti.FrontEndDTI:F1}%");   // 25.0%
Console.WriteLine($"Back-end DTI: {dti.BackEndDTI:F1}%");     // 35.0%
Console.WriteLine($"Front-end status: {dti.FrontEndStatus}"); // Good
Console.WriteLine($"Back-end status: {dti.BackEndStatus}");   // Good

// FHA-specific status labels (31% / 50% modeled thresholds)
var dtiFHA = MortgageCalculator.CalculateDTIForLoanType(
    grossMonthlyIncome: 6000,
    monthlyHousingCost: 1500,
    otherMonthlyDebts: 600,
    loanType: LoanType.FHA
);
Console.WriteLine($"FHA back-end status: {dtiFHA.BackEndStatus}");

LTV Calculation

// Conventional LTV
var ltv = MortgageCalculator.CalculateLTV(
    propertyValue: 350000,
    loanAmount: 280000,
    loanType: LoanType.Conventional
);

Console.WriteLine($"LTV: {ltv.Ratio:F1}%");                        // 80.0%
Console.WriteLine($"Mortgage insurance: {ltv.MortgageInsurance}"); // None

// FHA carries MIP (this library identifies the type only; MIP amounts and duration
// depend on loan term, LTV, and base loan amount , not calculated here)
var ltvFHA = MortgageCalculator.CalculateLTV(350000, 280000, LoanType.FHA);
Console.WriteLine($"FHA insurance: {ltvFHA.MortgageInsurance}"); // FHA_MIP

// VA has no conventional PMI
var ltvVA = MortgageCalculator.CalculateLTV(350000, 350000, LoanType.VA);
Console.WriteLine($"VA insurance: {ltvVA.MortgageInsurance}"); // None

Monthly Payment

var payment = MortgageCalculator.CalculateMonthlyPayment(
    loanAmount: 280000,
    annualInterestRate: 6.5,
    termYears: 30
);
Console.WriteLine($"Monthly Payment: ${payment:F2}"); // $1,770.04

// Zero percent interest rate supported
var zeroRate = MortgageCalculator.CalculateMonthlyPayment(120000, 0, 10);
Console.WriteLine($"0% interest payment: ${zeroRate:F2}"); // $1,000.00

Borrower Screening

var screening = MortgageCalculator.ScreenBorrower(
    grossMonthlyIncome: 6000,
    monthlyHousingCost: 1500,
    otherMonthlyDebts: 600,
    propertyValue: 350000,
    loanAmount: 280000,
    creditScore: 720,
    loanType: LoanType.Conventional
);

Console.WriteLine($"Meets modeled criteria: {screening.MeetsModeledCriteria}");
foreach (var note in screening.Notes)
    Console.WriteLine($"  - {note}");

Modeled Screening Thresholds

These are the simplified values used by this library. They are not universal underwriting rules.

Loan Type Front-End Back-End Credit (modeled) Max LTV MI
Conventional 28% 45% 620 97% PMI > 80%
FHA 31% 50% 580 96.5% MIP (type only)
VA No limit 41%* 580* 100% None

*VA values are this library's own modeled screening parameters. VA has no official credit score minimum and no official front-end DTI limit. VA underwriting considers residual income and other factors not modeled here.

Conventional and FHA thresholds are simplified. Actual criteria vary by automated underwriting system, lender overlays, and compensating factors.

License

MIT License. Copyright 2026 Sanjeev Kumar, OurNetHelps.com.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 49 9/24/2026

Initial release. Includes full input validation, loan-type-specific DTI status labels, mortgage insurance type by loan program (PMI/FHA_MIP/None), 0% interest rate support, and carefully scoped modeled screening criteria with explicit disclaimers.