Free tool

Proration calculator

Work out what to charge or credit for a mid-cycle upgrade, downgrade, seat change or co-termed add-on. You get every invoice line and the working behind it, including the edge cases: short months, leap years and billing on the 31st.

Using an AI assistant? Copy a prompt that gives it this calculator.

Billing schedule
Before the change
After the change

For a seat change, keep the price and change the quantity.

Proration settings
Charge now

—

Invoice lines

Line Service period Fraction Amount

How it's calculated

    The same numbers under each method

    Proration methods disagree most in February and in annual contracts that span a leap day.

    Three ways to prorate

    All three agree in a 30-day month. Take 10 days left in February 2026 on a $3,000/month plan and they give three different answers.

    Actual days in the period

    Price × days used ÷ days in that period

    $1,071.43

    $3,000 × 10/28

    Every full month costs the same, so a day in February costs more than a day in March. The most common method, and the one Bunny Billing uses.

    365-day year

    Annual price × days used ÷ 365

    $986.30

    $36,000 × 10/365

    Every day of the year costs the same. Common in annual contracts and when finance thinks in daily rates.

    30/360

    Price × 30/360 days ÷ 30

    $1,200.00

    $3,000 × 12/30

    Every month counts as 30 days, so February 19 to month end is 12 “days”. Half a month is always half the price. Shows up in contracts that define a month as 30 days.

    The edge cases spreadsheets get wrong

    Billing on the 29th, 30th or 31st

    A subscription that started on January 31 bills on February 28, then March 31. Its periods run 28 to 31 days, and a formula that assumes “same day next month” breaks every February.

    Leap years

    An annual contract that spans February 29 has 366 days. Divide by 365 and the customer pays for a day that does not exist in the price.

    Rounding per line

    A credit and a charge each round to the cent, so the net can differ by a cent from prorating the difference. Going from 10 to 15 seats at $20 with 21 of 31 days left is $67.75 on the invoice, not $67.74.

    Sub-cent prices and other currencies

    $0.0045 per unit across a million units needs exact arithmetic until the last step. Yen has no minor unit and some dinars have three decimal places, so “round to 2 decimals” is wrong for them.

    Use it in code, or give it to your AI agent

    This calculator runs on billing-math, an open-source MIT library from Bunny. Language models are unreliable at date and money arithmetic, so give your agent the MCP server and it calls exact functions instead of guessing.

    Give it to your AI in one paste

    Copy this prompt into Claude Code, Cursor, Claude Desktop or any assistant that supports MCP. It installs the server, checks the answer against a known example, and switches to exact tools for billing questions.

    See the prompt
    Set up the billing-math MCP server for me so you can do SaaS billing math exactly instead of estimating it: proration, plan and seat changes, co-terming and ramped multi-year deals.
    
    About it: an open-source (MIT) stdio MCP server from Bunny Billing, published on npm as @bunnyapp/billing-math. Source: https://github.com/bunnyapp/billing-math. It needs Node.js 20 or later and runs with: npx -y @bunnyapp/billing-math
    
    1. Add the server to the MCP configuration of the app I'm using right now.
       - Claude Code: run claude mcp add billing-math -- npx -y @bunnyapp/billing-math
       - Cursor, Claude Desktop, Windsurf, VS Code or another MCP client: add this server to its MCP config file, adjusting the format if the app uses a different one:
         {
           "mcpServers": {
             "billing-math": {
               "command": "npx",
               "args": ["-y", "@bunnyapp/billing-math"]
             }
           }
         }
       If you can't change the configuration yourself, give me exact step-by-step instructions for this app instead.
    2. Tell me if I need to restart the app or reload its MCP servers.
    3. Once it is connected, check it works: use calculate_plan_change for a $3,000/month plan upgraded to a $4,500/month plan on 2026-06-19, where the billing period started on 2026-06-01. The answer should be $600.00 due now.
    
    From then on, use the billing-math tools (calculate_plan_change, calculate_coterm, prorate_charge, get_billing_period, model_ramp_deal) for any proration, upgrade, downgrade, seat change, co-term, billing-date or ramp deal (TCV, ACV, ARR, invoice schedule) question, and show me the explanation steps they return.
    npm
    npm install @bunnyapp/billing-math
    
    import { calculatePlanChange } from '@bunnyapp/billing-math';
    
    calculatePlanChange({
      anchorDate: '2026-06-01',
      changeDate: '2026-06-19',
      from: { price: 3000, name: 'Growth' },
      to: { price: 4500, name: 'Scale' },
    }).net; // 600
    MCP server
    claude mcp add billing-math -- npx -y @bunnyapp/billing-math
    
    {
      "mcpServers": {
        "billing-math": {
          "command": "npx",
          "args": ["-y", "@bunnyapp/billing-math"]
        }
      }
    }

    View billing-math on GitHub

    The terms behind the numbers

    Definitions for everything this calculator touches.

    Stop working this out by hand

    In Bunny Billing, a mid-term change is a quote against the live subscription. The proration is worked out from the subscription's actual state on the change date, and the amount the customer signs is the amount on the invoice.

    FAQ

    Frequently asked questions

    How is proration calculated?
    Multiply the full-period price by the share of the period that is left. With daily proration that share is days remaining ÷ days in the billing period. For an upgrade, credit the unused time on the old price and charge the remaining time on the new price: a $3,000/month plan upgraded to $4,500/month on June 19 leaves 12 of June's 30 days, so the credit is $1,200, the charge is $1,800 and $600 is due now.
    How do you prorate a seat increase?
    The same way as an upgrade, with the price held constant and the quantity changed. Going from 40 to 60 seats at $60 a month with 12 of 30 days left credits 40 seats × $60 × 12/30 = $960 and charges 60 × $60 × 12/30 = $1,440, so $480 is due now. That equals the 20 added seats for 12 days.
    What is the difference between actual-day, 365-day and 30/360 proration?
    Actual-day proration divides by the days in that billing period, so every full month costs the same and a day in February costs more than a day in March. 365-day proration prices every day of the year the same. 30/360 treats every month as 30 days, so half of any month is exactly half the monthly price. The methods agree in 30-day months and differ most in February: 10 days left in February on a $3,000 plan is $1,071.43, $986.30 or $1,200 depending on the method.
    What is co-terming?
    Co-terming makes a product added mid-contract end on the same date as the existing contract, so everything renews together. The add-on gets a prorated first charge up to the next billing date, then full periods through the term end.
    Should a downgrade be credited immediately?
    It is a policy choice. Crediting the unused time straight away is the mirror image of an upgrade and the fairest to the customer. Many B2B SaaS contracts instead let the customer keep the higher plan until renewal and start the lower price then, with nothing credited. The calculator supports both.
    Why is the amount due a cent different from prorating the price difference?
    An invoice shows the credit and the charge as separate lines, and each is rounded to the cent on its own. Prorating the difference and rounding once can land a cent away. The calculator follows the invoice, because that is the number the customer pays.
    What happens with a billing day of the 29th, 30th or 31st?
    The billing date falls on the last day of shorter months and returns to the original day afterwards. A subscription billed on the 31st renews on February 28 (29 in a leap year), then on March 31, so its billing periods are 28 to 31 days long.
    How does Bunny Billing handle proration?
    Bunny Billing prorates mid-term changes by actual days in the billing period, with billing days of 29–31 falling on the last day of shorter months: the defaults in this calculator. When a quote changes an existing subscription, the prorated amount on the quote is the amount on the invoice.
    Does this tool send my numbers anywhere?
    No. Everything runs in your browser. Nothing is transmitted, stored or logged. Inputs only go into the page URL when you change something, so you can share a calculation.