A New Jersey home on JCP&L's typical usage pays 21.9¢ a kWh, everything counted. So a 1,500 kWh July bill should be 1,500 × 21.9¢ ≈ $329, right?

It's $349.82. And a 600 kWh month costs $15.15 less in July than in January, while a 1,500 kWh month costs $24.10 more.

An electricity bill isn't a price times a quantity. It's a stack of separate charges, each with its own rules: seasons, a block at 600 kWh, a monthly fixed charge, a quarterly true-up that can turn into a credit, and sales tax already baked into every rate. For the JCP&L electricity rates page on GreenCalculus, I wanted a calculator that gets a real bill right to the cent. This post covers how: reading 81 tariff revisions out of PDFs, a bill engine checked against JCP&L's own published bills, and why the PHP and JavaScript copies of that engine are tested against each other on 3,000 random bills.

The source: the tariff, not a rate table

Jersey Central Power & Light (JCP&L) publishes its rules as a tariff: a long PDF that the state's Board of Public Utilities approves. Every residential charge is in Part III. For rate RS (most homes), from 1 October 2026:

Charge Rate (tax included)
Customer charge $4.27 a month
Distribution, June to September 2.0182¢ for the first 600 kWh, 7.9810¢ above
Distribution, October to May 3.3061¢ every kWh
Supply (BGS), June to September 12.8815¢ for the first 600 kWh, 13.8040¢ above
Supply (BGS), October to May 14.1185¢ every kWh
Transmission 2.1303¢
Riders (Societal Benefits Charge and six others, one of them a credit) 1.0716¢
BGS reconciliation 0.8040¢ (it changes every quarter, and it can be negative)

That's why the July and January bills cross over. Summer prices the first 600 kWh low and everything above it high. Winter has one price for every kWh, and winter supply costs more than either summer block. So a small home pays less in summer; above about 950 kWh, summer is the dearer season.

Reading 81 revisions without trusting any of them

FirstEnergy lists every revision of Part III back to January 2019: 81 PDFs, each a full copy of the tariff as it stood from one date. The parser pulls out each charge with a regex, and the rule is simple: a pattern that matches the wrong number of times stops the run.

def one(pat, txt, name, flags=re.S): m = re.findall(pat, txt, flags) if len(m) != 1: stop('%s: pattern matched %d times' % (name, len(m))) return m[0] 

Zero matches means the layout changed. Two matches means the pattern is too loose and might have grabbed the wrong number. Either way a person needs to look, so the script stops instead of guessing.

The tariff also gives free cross-checks. Each rider sheet prints its price with and without New Jersey's 6.625% sales tax, so the parser checks with_tax == without_tax × 1.06625 on each of those. The Societal Benefits Charge is the sum of four parts, so the parts have to add up. The run finishes with 86 checks, and any one failing stops it.

The real test: JCP&L's own bills

Parsing correctly isn't the same as billing correctly. The check that matters is whether the engine reproduces bills that JCP&L itself published.

In its August 2026 rate filing, JCP&L prices its "typical" home (926 kWh in each summer month, 688 in each winter month) at $162.30 a month on the July 2026 charges: $121.87 for supply and $40.43 for delivery. It also prices flat 500, 1,000 and 1,500 kWh homes, before and after its proposed increase.

TYP = round(year_avg(TJ, 926, 688, recon=False), 2) expect('engine, 15 July 2026 tariff = JCP&L typical $162.30', TYP, 162.30, 0.005) yp = year_parts(TJ, 926, 688, recon=False) expect('engine BGS part (energy + transmission) = $121.87', round(yp['bgs'] + yp['trans'], 2), 121.87, 0.005) expect('engine delivery part = $40.43', round(yp['cust'] + yp['dist'] + yp['rid'], 2), 40.43, 0.005) 

All of them match to the cent, including the proposed $174.18 and $176.53. That's what makes the other 80 revisions trustworthy: the same engine, fed each revision's charges, prices the same home on every date since 2019.

What 81 revisions show

Priced on each revision, the typical home went from $108.57 in January 2019 to $168.40 in October 2026, up $59.83. Supply (BGS) added $43.20 of that, nearly three quarters. JCP&L's own base rates (customer charge and distribution) added $8.13.

The single biggest jump was 1 June 2025: +$22.74 a month, when the new supply prices from that year's state auction took effect. The BPU traced that rise mainly to PJM's July 2024 capacity auction. The biggest fall was June 2019 (−$12.20). And 14 of the 80 changes didn't move the typical bill at all: they changed something in the tariff that this home doesn't pay.

Rounding: per line, half up, with a nudge

A bill rounds each line to the cent, then adds the lines. The total isn't rounded once at the end. Skip that and 2,838 of the 3,000 test bills come out a cent or two off.

The rounding rule needs care too. This is the helper, in Python:

def R2C(x): # x in cents return int(abs(x) + 0.5 + 1e-9) * (-1 if x < 0 else 1) 

Why not Python's round()? Because it rounds half to even: round(20152.5) is 20152. Why the 1e-9? Here's the case that needs it. A 1,500 kWh summer month has a BGS line of:

600 × $0.128815 + 900 × $0.138040 = $77.289 + $124.236 = $201.525 

Exactly half a cent, which should round up to $201.53. But in floating point:

>>> 100 * (600 * 0.128815 + 900 * 0.13804) 20152.499999999996 

Plain half-up rounding gives $201.52. That's the 1,500 kWh edge value at work. On the 3,000 test bills:

Rounding rule Bills that differ
Half up, with the 1e-9 nudge 0
Half up, no nudge (JS Math.round, PHP round) 58
Python round() (half to even) 83
No rounding per line 2,838

The sign handling (abs, then the sign back) matters for credits. JavaScript's Math.round(-2.5) is −2, while PHP's round(-2.5) is −3. The BGS reconciliation charge was a credit from December 2025 to February 2026 (−0.9951¢ a kWh in December), so negative lines are real.

One engine, three languages, 3,000 bills

The page has two copies of the engine:

  • PHP writes the figures into the page on the server, so the numbers are in the HTML that search engines and readers see first.
  • JavaScript runs the calculator in the browser as you type your kWh.

Python is the reference, the one checked against JCP&L's filing. Two hand-written ports of a formula will drift, so the build generates 3,000 bills from a seeded random generator (both rate plans, every month, with and without a third-party supplier, with and without the proposed rates). The kWh is either random, from 0 to 4,000, or one of a few edge values: 0, 1, 599, 600, 601, 650, 767, 926 and 1,500. and stores Python's answer, line by line:

{"k": 601, "m": 1, "plan": "rs", "on": 47.8, "sup": null, "recon": true, "case": false, "tot": 13306, "lines": [427, 1987, 644, 1280, 8485, 483]} 

Then each port runs every case and compares the whole bill, every line in whole cents:

for (const c of D.cases) { const r = jcplBill(D.T, c.k, c.m, c.plan, c.on, c.sup, c.recon, c.case ? D.case : null); const got = { tot: r.tot, lines: r.lines.map(l => l[1]) }; if (JSON.stringify(got) !== JSON.stringify({ tot: c.tot, lines: c.lines })) bad++; } 

Run today: PHP 3,000/3,000 match. JS 3,000/3,000 match. The edge values earn their place: 599, 600 and 601 sit on the summer block line, where an off-by-one in min(k, 600) would show, and 1,500 is the one that caught the half cent.

What the engine leaves out

A model is only honest if it says what it skips. The page lists these: one-off state credits, the Universal Service Fund and Lifeline credits, budget billing, solar net metering, closed rates such as water heating, and the day-weighted split a real bill gets when a rate changes partway through a billing period. A real bill in a month when rates change can differ by more than a few cents, and the page says so next to the result.

The pattern

For any published tariff, price list or fee schedule you turn into code:

  1. Parse with patterns that must match exactly once. Stop on zero or two.
  2. Use the source's own cross-checks: tax-inclusive vs exclusive prices, parts that sum to totals.
  3. Test the engine against bills the source itself published, to the cent.
  4. Round the way the bill does: per line, half up, with a nudge for floats, and keep the sign separate.
  5. When the same formula lives in two languages, generate cases from one and test the others against them.

Try it

The JCP&L electricity rates page has the calculator (RS and the time-of-day RT rate, with or without a third-party supplier), where the money goes, every charge since 2019, and JCP&L's pending rate case. The data is free to reuse under CC BY 4.0, with a DOI.

I'm Jeremiah Say, founder of GreenCalculus. AI assistants helped read the tariffs, build the engine and draft this post. The figures were run on 20 November 2026 against JCP&L's tariff in force from 1 October 2026.