A simple npm package to calculate the tax amount for Roblox transactions. Roblox takes a 30% tax on transactions made through its platform. This package helps you quickly calculate the net amount after deducting the tax.
To install roblox-tax-calculator, simply run the following npm command:
npm install roblox-tax-calculator
Using roblox-tax-calculator is straightforward. Here's an example of how to use it in your JavaScript code:
const calculateRobloxTax = require('roblox-tax-calculator');
// Calculate tax for a given amount
const taxInfo = calculateRobloxTax(1000);
console.log(taxInfo);
/*
Output:
{
grossAmount: 1000,
taxAmount: 300,
netAmount: 700,
remittanceAmount: 300
}
*/
The calculateRobloxTax
function takes the transaction amount as input and returns an object with detailed tax information:
-
grossAmount
: The original transaction amount. -
taxAmount
: The calculated tax amount based on the default tax rate of 30%. -
netAmount
: The net amount after deducting the tax. -
remittanceAmount
: The amount that must be remitted as tax.
This project is licensed under the MIT License.
You can join my Discord Community server or DM me HERE .