The arithmetic
Month = calls × (input tokens × input rate + output tokens × output rate + cache-read tokens × cache-read rate + cache-write tokens × cache-write rate) / 1,000,000.
Calls and days
Calls = calls per day × days. Days defaults to 30. That is an assumption you can edit. It is not how any of these vendors define a billing month.
What the default number is
With JavaScript off, the homepage keeps a worked example: gpt-6.1-sol, 4,000 input tokens, 800 output tokens, no cache, 200 calls a day, 30 days. Rate is $2 and $10 per 1M. 6,000 × (4,000 × $2 + 800 × $10) / 1,000,000 = $96.00. Scripts only redo that arithmetic for other fields.
xAI unit
The Grok 4.7 card prints $2 input and $6 output per 1M. The same docs page ships a model payload where promptTextTokenPrice is 20000 and completionTextTokenPrice is 60000. Dividing by 10,000 matches the card. cachedPromptTokenPrice 5000 is therefore $0.50. Grok 4.5 and Grok 4.3 use the same payload and the same divisor. Long-context fields are in the payload. The page did not state the prompt length where they start, so they are listed in the notes and not applied.