Skip to main content

unithub_rent_calculator 1.0.0 copy "unithub_rent_calculator: ^1.0.0" to clipboard
unithub_rent_calculator: ^1.0.0 copied to clipboard

A Dart utility for calculating rental property yields, mortgage repayments, and rental affordability. Designed for landlords, property managers, and tenants in New Zealand and beyond.

example/unithub_rent_calculator_example.dart

import 'package:unithub_rent_calculator/unithub_rent_calculator.dart';

void main() {
  // Calculate gross rental yield for a $750,000 property rented at $600/week
  final annualRent = 600 * 52;
  final grossYield = grossRentalYield(annualRent.toDouble(), 750000);
  print('Gross yield: ${grossYield.toStringAsFixed(2)}%');

  // Calculate net yield after $8,000 in annual expenses
  final netYield = netRentalYield(annualRent.toDouble(), 8000, 750000);
  print('Net yield: ${netYield.toStringAsFixed(2)}%');

  // Monthly mortgage repayment on a $600k loan at 6.5% over 30 years
  final repayment = monthlyMortgageRepayment(600000, 6.5, 30);
  print('Monthly repayment: \$${repayment.toStringAsFixed(2)}');

  // Check if $600/week rent is affordable on $95,000 annual income
  final affordable = isRentAffordable(600, 95000);
  print('Affordable: $affordable');

  // Convert weekly to monthly rent
  final monthly = weeklyToMonthlyRent(600);
  print('Monthly rent: \$${monthly.toStringAsFixed(2)}');
}
0
likes
150
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart utility for calculating rental property yields, mortgage repayments, and rental affordability. Designed for landlords, property managers, and tenants in New Zealand and beyond.

Homepage
Repository (GitHub)

License

MIT (license)

More

Packages that depend on unithub_rent_calculator