NetSuite Governance Unit Calculator for SuiteScript
Every SuiteScript API call that touches data costs governance units, and each script stage has a ceiling. This calculator shows how many units a planned run will use and how many records can be processed before the script must stop, yield or reschedule.
Your numbers
Check the SuiteScript governance table for the exact limit of your script type and stage.
Varies by record type. Transactions cost more than custom records.
Varies by record type. Verify in the governance table.
Your results
Unit costs depend on record type and API. Use the SuiteScript governance table in NetSuite Help for the exact values in your release, and confirm in a sandbox with runtime.getCurrentScript().getRemainingUsage().
Estimated units vs records processed
Sweeps Records processed per run from 0 to 600, holding your other inputs fixed.
Script performance review
Optional review of your slowest or most governance-heavy NetSuite scripts.
Optional. The tool and every export work without this. No spam.
How to use the calculator
Choose the limit for your script type and stage, then enter the records per run, the number of loads and saves per record and the unit cost of each. Add a fixed amount for searches and lookups made once per run. The result shows total units, the share of the limit used and the maximum records per execution after your safety buffer. If the total exceeds the limit, split the work across stages or runs.
The formula
Units per record are loads times load cost plus saves times save cost. Total units are records times units per record plus fixed units. Usable units are the limit reduced by the buffer, and the maximum records per execution is the usable units minus fixed units, divided by units per record and rounded down. Executions needed is the volume divided by that maximum, rounded up.
- Load and save costs differ by record type
- submitFields is usually cheaper than load and save
- Search pages and lookupFields have their own costs
- Keep a buffer for logging and error paths
Reading the result
With the defaults, a record costs 30 units and the 1000 unit limit with a 10 percent buffer allows about 29 records. That is why a user event that rewrites many child records fails, while a map/reduce script, which resets usage for each map and reduce invocation, can process the same volume safely. If the maximum is small, redesign around submitFields, fewer loads or a map/reduce structure.
Common mistakes
People often use one unit cost for every record type, forget that searches consume units per page, and assume governance resets between loop iterations. It does not. Another mistake is checking remaining usage only at the end. Check getRemainingUsage inside the loop and stop early, and test with production-sized data, since sandbox data volumes hide the problem.
Frequently Asked Questions
What are governance units in NetSuite?
They are a metered cost for SuiteScript API calls such as loading, saving and searching records. Each script type and stage has a maximum per execution, and exceeding it throws an error that stops the script.
How do I check remaining usage?
Call runtime.getCurrentScript().getRemainingUsage() in SuiteScript 2.x and compare it with the cost of your next operation. Stop, yield or reschedule when it drops below a threshold you choose.
Why use map/reduce for big jobs?
Map/reduce splits work into many small invocations, each with its own governance allowance, and NetSuite manages queueing and retries. This avoids the single-run ceiling that scheduled scripts hit with large volumes.
Do the defaults in this calculator apply to every record?
No. They are placeholders. Costs differ by record type and API, so replace them with the values from the SuiteScript governance table for your release and confirm with a sandbox run.
If your NetSuite customizations are hitting governance limits, Netray can help review scripts and design batch patterns, with a human approving every change.
Related Tools
SuiteScript Map/Reduce Skeleton Generator
A SuiteScript 2.1 map/reduce template with a SuiteQL input stage, map and reduce handlers and a summarize stage that reports every error.
NetSuiteSuiteScript 2.1 User Event Script Skeleton
A copy-ready SuiteScript 2.1 user event script with the JSDoc annotations, entry points, context checks and error logging you need to start.
NetSuiteSuiteQL Query Generator
Fill in a table, columns, filter and sort and get a SuiteQL statement ready for the N/query module, the REST SuiteQL endpoint or the SuiteAnalytics Workbook.
NetSuiteNetSuite REST Record API URL Builder
Generate correct REST web services URLs and sample calls for a NetSuite record, a record list, a SuiteQL query or the metadata catalog.
More NetSuite tools
See all- NetSuite Saved Search Formula Generator
- NetSuite CSV Import Template Guide
- NetSuite Role Permission Matrix Worksheet
- NetSuite Inventory Costing Method Reference
- NetSuite Month End Close Checklist
- NetSuite License Cost Estimator
- NetSuite User Access Request Form Template
- NetSuite Custom Record Design Spec Template
- NetSuite SuiteScript Deployment Handover Template
New to NetSuite? Start with the NetSuite guide and toolkit, or plan with NetSuite Cost Calculator, Training Path Builder, ERP Certification Study Planner.
Keep exploring
Free tools
- NetSuite SuiteScript Governance Units EstimatorEstimate how many records a SuiteScript execution can process under its governance limit and how many runs a batch will need.
- NetSuite SuiteScript Governance Units by Script TypeA lookup of governance unit limits for each SuiteScript script type and the design guidance that follows from them.
- SuiteScript Scheduled Script Run Count CalculatorEstimate total governance units, records per run, number of reschedules and total runtime for a scheduled script before you write it.
ERP fixes and how-tos
- Fix NetSuite SSS_USAGE_LIMIT_EXCEEDED ErrorSSS_USAGE_LIMIT_EXCEEDED means your SuiteScript ran out of governance units. Learn the cause, how to check usage, and fixes using submitFields and Map/Reduce.
- Avoiding governance limit errors in NetSuite Map/Reduce scriptsUnderstand how governance is allocated per key in NetSuite Map/Reduce scripts, why SSS_USAGE_LIMIT_EXCEEDED still happens, and how to design getInputData, map, reduce and summarize stages that do not time out.
- Fix NetSuite SSS_REQUEST_LIMIT_EXCEEDED ErrorSSS_REQUEST_LIMIT_EXCEEDED means too many web services or RESTlet calls ran at once for your account tier. How to fix and prevent this concurrency error.
Integrations
- How to use ChatGPT with Oracle NetSuiteConnect ChatGPT to Oracle NetSuite: custom GPT actions, exports versus live access, enterprise data controls, and when a private model is the safer choice.
- How to use Claude with Oracle NetSuiteUse Claude with Oracle NetSuite through MCP connectors, the Anthropic API, AWS Bedrock or Vertex, plus the on-prem alternative for controlled data.