rakeFromPot
Rake under the package’s standard model: min(rakeFraction × potChips, rakeCap).
rakeFromPot(potChips: number, rakeFraction: number, rakeCap: number): number
Import
const poker = require('poker-calculations');
ESM (Node):
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');
When to use
Use to show rake dollars in a breakdown, or to sanity-check breakevenCallEquityWithRake and expectedValueCallWithRake (those apply rake to the final pot after a call). rakeFraction must not exceed 1 for this model.
How to use
const poker = require('poker-calculations');
const finalPot = 150; // e.g. 90 + 2×30 after HU call
const rakeFraction = 0.05;
const rakeCap = 3;
const rake = poker.rakeFromPot(finalPot, rakeFraction, rakeCap);
console.log(rake); // min(7.5, 3) = 3
const potBeforeCall = 90;
const toCall = 30;
const need = poker.breakevenCallEquityWithRake(
potBeforeCall,
toCall,
rakeFraction,
rakeCap,
);
console.log({ rake, need });
Returns number — min(rakeFraction × potChips, rakeCap). All chip arguments must be finite and non-negative; rakeFraction must not exceed 1.
See also
breakevenCallEquityWithRake · expectedValueCallWithRake · Pot & EV index