---
title: "Proration calculator"
url: "https://trialvalid.com/proration-calculator.md"
canonical_url: "https://trialvalid.com/proration-calculator"
last_updated: "2026-10-19"
type: "tool"
summary: "Moving a $49 plan up to $99 when 15 of the 30 days remain owes $25.00 now: $49.50 less a $24.50 credit."
related: ["https://trialvalid.com/price-increase-calculator.md", "https://trialvalid.com/mrr-calculator.md", "https://trialvalid.com/churn-rate-calculator.md", "https://trialvalid.com/gross-margin-calculator.md", "https://trialvalid.com/pricing.md", "https://trialvalid.com/saas-metrics.md"]
---

# Proration calculator

> **For AI agents:** the complete index of TrialValid pages is [llms.txt](https://trialvalid.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Moving a $49 plan up to $99 when 15 of the 30 days remain owes $25.00 now: $49.50 less a $24.50 credit.

Example with the default inputs:

| Input | Value |
| --- | --- |
| Current period start | 2027-04-01 |
| Next period start | 2027-05-01 |
| Date of the change | 2027-04-16 |
| Old price for the period | 49 |
| New price for the period | 99 |

| Result | Value |
| --- | --- |
| Days in the period | 30 |
| Days left, change day included | 15 |
| Daily rate, old price | $1.63 |
| Daily rate, new price | $3.30 |
| Credit for the unused old plan | $24.50 |
| Charge for the rest of the period on the new plan | $49.50 |
| Due now | $25.00 |

Working:

1. Days in the period: 30 days from the period start to the next period start.
2. Days left: 15 days from the change date, counting the change day itself, to the next period start. That is 50.0% of the period.
3. Credit for the unused old plan: $49.00 x 15 / 30 = $24.50, rounded half up to the cent.
4. Charge for the rest of the period on the new plan: $99.00 x 15 / 30 = $49.50, rounded half up to the cent.
5. Due now: $49.50 - $24.50 = $25.00.

## How the proration works

A billing period has a number of days. When the price changes part-way through, the customer has already paid for the old plan for the whole period, so the unused share of that payment becomes a credit. The new plan is then charged for the same unused share. What is due now is the charge minus the credit.

In symbols:

```text
D = next period start - period start        (days in the period)
L = next period start - change date         (days left, change day included)
credit = old price x L / D      rounded half up to the cent
charge = new price x L / D      rounded half up to the cent
due now = charge - credit
```

The credit and the charge are each rounded to the cent first and then subtracted, so the displayed credit, charge and total always add up.

## Worked examples

### An upgrade half way through the month

A customer on $49 moves to $99 on 16 Apr 2027, in a period that runs 1 Apr 2027 to 1 May 2027.

| Step | Value |
| --- | --- |
| Old price | $49 |
| New price | $99 |
| Days in the period | 30 |
| Days left, change day included | 15 |
| Credit for the unused old plan | $24.50 |
| Charge for the rest of the period on the new plan | $49.50 |
| Due now | $25.00 |

### A downgrade on the same date

The same dates with the prices reversed produce a credit owed instead of an amount due: $25.00.

| Step | Value |
| --- | --- |
| Old price | $99 |
| New price | $49 |
| Days in the period | 30 |
| Days left, change day included | 15 |
| Credit for the unused old plan | $49.50 |
| Charge for the rest of the period on the new plan | $24.50 |
| Credit owed to the customer | $25.00 |

### The example from the Stripe documentation

Stripe's prorations page describes a move from $10 to $20 halfway through the period. The calculator reproduces it with the same two prices and a change date at the halfway point.

| Step | Value |
| --- | --- |
| Old price | $10 |
| New price | $20 |
| Days in the period | 30 |
| Days left, change day included | 15 |
| Credit for the unused old plan | $5.00 |
| Charge for the rest of the period on the new plan | $10.00 |
| Due now | $5.00 |

### The same change in months of different length

A change on the 16th from $49 to $99, in four different months. The calendar supplies the day counts.

| Month | Days left | Credit | Charge | Due now |
| --- | --- | --- | --- | --- |
| February 2027 (28 days) | 13 | $22.75 | $45.96 | $23.21 |
| February 2028 (29 days, leap year) | 14 | $23.66 | $47.79 | $24.13 |
| April 2027 (30 days) | 15 | $24.50 | $49.50 | $25.00 |
| May 2027 (31 days) | 16 | $25.29 | $51.10 | $25.81 |

## Reference table: what a day costs

The cost of the same $99 plan changes with the length of the period. This table gives the price of one day and of ten days.

| Length of the period | Cost of one day of a $99 plan | Cost of ten days |
| --- | --- | --- |
| 28 days | $3.54 | $35.36 |
| 29 days | $3.41 | $34.14 |
| 30 days | $3.30 | $33.00 |
| 31 days | $3.19 | $31.94 |

## What the Stripe documentation says

- Stripe's default is to prorate to the exact second, and it can use day, hour, week or month steps instead. This calculator counts whole days, so a figure here can differ from a to-the-second invoice. At noon on 16 Apr 2027 the default example comes to $24.17 due now to the second, against $25.00 by whole days.
- The parameter that controls what happens on a change is `proration_behavior`. The documentation shows the values `create_prorations`, `always_invoice` and `none`: `always_invoice` calculates the proration and immediately generates an invoice, and `none` turns prorations off for that request.
- Stripe does not refund a negative proration on its own, and does not bill a positive one at once, but you can do either by hand.

> Read from [Stripe's prorations page](https://docs.stripe.com/billing/subscriptions/prorations) on 19 Oct 2026. Stripe can change its documentation, so check the page before building a billing rule on it.

## Edge cases

- A change date at or before the period start, or on or after the next period start, is invalid: there is no time left to prorate, or no time already used.
- A period of zero days, or a next period that starts before the current one, is invalid because there is no daily rate to divide by.
- Dates that do not exist, such as 30 February, are refused with an explanation.
- Leap years and months of 28 to 31 days follow the real calendar.
- Prices cannot be negative. A price of zero on either side is allowed, which covers moving from or to a free plan.
- Rounding happens at the credit and at the charge, each to the cent, before the subtraction.

## Questions

### How is a proration calculated?

Take the old price times the days left over the days in the period for the credit, and the new price times the same fraction for the charge, then subtract. With $49 moving to $99 on 16 Apr 2027, 15 of 30 days remain, so the credit is $24.50, the charge is $49.50 and $25.00 is due now.

### What happens when a customer moves to a cheaper plan?

The result turns around. Moving $99 down to $49 on the same date gives a credit of $49.50 against a charge of $24.50, so $25.00 is owed to the customer. Stripe's documentation says a negative proration is not refunded automatically, so a refund is a separate step you take.

### Does the change day count?

In this calculator, yes. Days left run from the change date, counting that day, up to the start of the next period, so a change on 16 Apr 2027 leaves 15 days. A change at the very start of the period, or on or after the next period start, is refused because there is nothing to prorate.

### Why can my invoice differ from this calculator by a few cents or more?

Stripe's documentation says it prorates to the second by default, while this calculator counts whole days. A change made at noon on 16 Apr 2027 has 14.5 days left to the second, which gives a credit of $23.68, a charge of $47.85 and $24.17 due now, against $25.00 for the whole-day count. The size of the gap depends on the time of day of the change.

### Do leap years and short months change the answer?

They change the daily rate but not the share of the period that remains. A change on the 16th leaves 13 days in February 2027 (28 days), 14 in February 2028 (29 days, leap year) and 16 in May 2027 (31 days), and the dollar amounts follow from each. The calculator uses real calendar days, so you only enter the dates.

### Does this reproduce the example in Stripe documentation?

Stripe's documentation describes a customer who moves from a $10 monthly plan to a $20 plan halfway through the period, with a credit of $5, a debit of $10 and $5 billed. Entering those two prices with a change date halfway through a 30 day period gives a credit of $5.00, a charge of $10.00 and $5.00 due now, the same three figures.

## Related tools

The [price increase calculator](https://trialvalid.com/price-increase-calculator.md) shows what a new price does to revenue and churn, the [MRR calculator](https://trialvalid.com/mrr-calculator.md) counts the expansion and contraction that plan changes create, and the [gross margin calculator](https://trialvalid.com/gross-margin-calculator.md) shows what is left after the cost of delivery. The [churn rate calculator](https://trialvalid.com/churn-rate-calculator.md) measures what happens to customers after a change, and the [metrics glossary](https://trialvalid.com/saas-metrics.md) defines the terms.

## Sources

- Stripe documentation, prorations: [https://docs.stripe.com/billing/subscriptions/prorations](https://docs.stripe.com/billing/subscriptions/prorations). Read on 19 Oct 2026.

## Related

- [Price Increase Calculator](https://trialvalid.com/price-increase-calculator.md)
- [MRR calculator](https://trialvalid.com/mrr-calculator.md)
- [Churn Rate Calculator](https://trialvalid.com/churn-rate-calculator.md)
- [Gross margin calculator](https://trialvalid.com/gross-margin-calculator.md)
- [Plans from $29 with a 14-day trial for $1](https://trialvalid.com/pricing.md)
- [SaaS metrics glossary](https://trialvalid.com/saas-metrics.md)
