Reverse-Engineering LLM Subscription Quotas from a Floating-Point Leak

    A leaked 17-digit floating-point number in a usage display can reveal a subscription plan's true quota. This article explains the math behind recovering fractions from floats (Stern-Brocot tree and continued fractions), the hidden levers in LLM subscription pricing such as non-linear quota scaling, and practical strategies for choosing plans and controlling costs based on measured data rather than marketing claims.

    Starting from a “Suspicious Decimal”

    On the web interface of a large language model service, an observant developer noticed something interesting: the usage data contained a floating-point number like 0.16327272727272726 — precise to 17 decimal places. Normally, a progress percentage shown to users would be rounded to one or two decimal places. Such a precise value looks like it was converted directly from a raw fraction (e.g., “quota used / total quota”) without any rounding.

    This small oversight opens a window: as long as you can collect multiple “usage snapshots,” you have a chance to reverse-engineer the denominator — the plan’s real quota. Behind this is a complete, general-purpose methodology worth knowing for anyone who cares about AI subscription costs. This article does not target any specific vendor’s product. Instead, it abstracts the technical ideas and explains three things: how to recover a fraction from a float, the common “hidden levers” in subscription pricing, and how to make cost-effective purchasing decisions based on them.

    1. Mathematical Recovery: Reconstructing the Real Quota from 17 Decimals

    1.1 The Mathematical Nature of the Problem

    Suppose the system’s internal logic is progress = used / limit, and this fraction is directly converted to a floating-point number for output. Because IEEE 754 double-precision floats carry only about 15–17 significant decimal digits, a fraction that can be exactly expressed by a pair of integers often shows obvious periodicity in its decimal expansion.

    Take 0.16327272727272726 as an example: the tail of the decimal shows a repeating “272727…” pattern — a classic signature of a denominator containing the prime factor 11. There is a one-to-one correspondence between rational numbers and repeating decimals, which makes recovery possible.

    1.2 The Stern-Brocot Tree: Binary Search over Fractions

    The Stern-Brocot tree is an elegant structure that organizes all positive fractions: every fraction appears exactly once, and any fraction can be approached by repeatedly choosing between a “left interval” and a “right interval.” Combined with exact float comparison, this amounts to a binary search over the entire space of fractions, with a complexity of roughly O(log n) — very efficient.

    A simplified version of the same idea can be implemented with “continued fraction expansion + Farey sequence bounds”:

    1. def recover_fraction(x: float, max_denominator: int = 100_000_000):
    2. # Optimal rational approximation via continued fractions (Stern-Brocot equivalent)
    3. frac = Fraction(x).limit_denominator(max_denominator)
    4. return frac # e.g., yields something like 9/55

    1.3 Cross-Validation and Error Handling

    A single data point is unreliable. In practice you need to:

    • Sample multiple times: record multiple (used_ratio, known_used) pairs at different usage levels. In theory limit = used / ratio; intersecting the results or finding common factors across multiple samples helps eliminate noise.
    • Look for greatest common divisors: if the limit values recovered from multiple samples share common factors, the true quota is most likely near their least common multiple.
    • Beware of accumulated error: if the system uses decrement-based counting, floating-point error accumulates with usage. Sampling points should be spread over a large interval.

    After cross-validating multiple datasets, some industry analyses have reached conclusions inconsistent with official claims — the actual quotas of certain high-tier plans may be more generous than the advertised multiples.

    2. The “Hidden Levers” of Subscription Pricing: You May Be Getting More Than the Advertised Multiple

    2.1 Internal Metering Units and Rate Systems

    Mainstream LLM subscription services usually do not bill directly per token. Instead, they introduce an intermediate metering unit (commonly “credits” or “request quota”). Different models consume this unit at different rates, generally following these patterns:

    • More powerful flagship models consume credits at several times the rate of lightweight models.
    • Output tokens are typically charged at several times the rate of input tokens.

    This rate system usually stays proportional to API pay-as-you-go pricing, so it is verifiable and can be modeled.

    2.2 Linear Pricing, Non-Linear Supply

    Interestingly, quota relationships between tiers do not necessarily scale linearly. Analysis shows that some plans’ actual quota multiples exceed the officially advertised multiples, and the amplification differs across dimensions (e.g., a “5-hour window quota” versus a “weekly cap”). This means:

    • The cost-performance curve is not monotonic: mid-tier or top-tier plans may contain a “sweet spot.”
    • Marketing claims deviate from real costs: officially “5x usage” might actually measure as 6x window quota and 8x weekly cap.

    Such deviations may be product strategy (encouraging upgrades to higher-priced tiers) or simply an engineering “coincidence.” For users, the takeaway is: subscription cost decisions should be based on measured quotas, not advertised numbers.

    2.3 Implications for Business Users

    For technical teams budgeting on a per-person, per-year basis, this kind of analysis provides a quantifiable basis:

    1. Estimate the team’s average daily consumption per person (modeling session length and model selection distribution).
    2. Compare measured quotas across tiers to compute the “cost per unit of quota.”
    3. Compare subscription plans against API pay-as-you-go to find the break-even point.

    For example, if the unit quota cost recovered from a plan’s measured weekly quota is lower than the equivalent API price, the subscription is more economical; otherwise, elastic API billing may be the better choice.

    3. General Best Practices: Managing LLM Subscription Costs

    3.1 Build Usage Observability

    • Prefer the platform’s official usage statistics APIs or console reports.
    • Record balance/progress snapshots at key points in time to build a time series, making it easier to discover quota reset cycles and consumption rates.
    • For team scenarios, aggregate request logs at a gateway layer and build usage dashboards with log services and monitoring/alerting capabilities.

    3.2 Using the Right Model Saves More Than Switching Plans

    • Delegate simple classification, extraction, and format-conversion tasks to lightweight models.
    • Reserve flagship models for complex reasoning and long-context understanding.
    • Use prompt compression and context trimming to reduce input tokens.
    • Control output length (e.g., request structured, concise output), since output is typically priced several times higher than input.

    3.3 A Checklist for Purchase Decisions

    Before subscribing, ask yourself four questions:

    1. What is the quota basis? A 5-hour window or a weekly cap? What are the reset rules?
    2. What is the real multiple? Is there credible third-party measurement data for cross-validation?
    3. Does my usage pattern fit? Users with bursty peak usage and users with steady usage have different optimal tiers.
    4. What is the exit cost? API pay-as-you-go has a higher unit price but no sunk cost, making it suitable for fluctuating workloads.

    3.4 Conclusion

    A single unrounded decimal allowed a pricing strategy to be fully reconstructed. This is both a fun reverse-engineering exercise and a reminder to all technical decision-makers: in cost-sensitive scenarios, data is always more trustworthy than marketing. For developers, mastering this kind of method — inferring system parameters from observed data — is useful not only for subscription cost analysis, but also for capacity planning and performance baseline calibration. And when choosing cloud-based AI services, consider “billing transparency, observability, and usage controllability” as key evaluation dimensions — these often determine long-term cost far more than simply comparing sticker prices.