The Reading Plan Algorithm

How BiblePlan creates balanced, sustainable reading schedules

Overview

Creating a Bible reading plan isn't as simple as dividing chapters by days. Bible chapters vary dramatically in length—some contain as few as 10 verses while others exceed 150. A naive approach would result in some days requiring 5 minutes of reading and others demanding over an hour.

BiblePlan's algorithm solves this by optimizing daily reading load based on verse counts, ensuring consistent, sustainable engagement throughout your reading journey.

Core Concepts

Two Distribution Modes

The algorithm automatically selects between two distribution strategies based on the ratio of chapters to days:

  • Chapter-based distribution (chapters > days): Assigns whole chapters to each day with sophisticated optimization to balance verse counts
  • Verse-based distribution (days > chapters): Splits chapters into precise verse ranges to spread content evenly

Verse-Weighted Allocation

When multiple reading groups exist, available days are distributed proportionally based on total verse count—not chapter count. This ensures fair allocation since chapters vary so dramatically in length. A group with twice as many verses receives approximately twice as many days.

Chapter-Based Distribution Algorithm

This is where the real sophistication happens. When you have more chapters than days, the algorithm must decide which chapters to group together while maintaining balanced daily reading loads.

Step 1.Calculate Ideal Daily Verse Count

// Calculate the target verses per day
idealVersesPerDay = totalVerses / totalDays

This gives us a baseline target. For example, reading 1,189 chapters over 365 days means we need ~97 verses per day on average.

Step 2.Analyze Chapter Length Variance

// Calculate standard deviation of chapter lengths
chapterLengths = chapters.map(ch => ch.verses)
meanLength = totalVerses / chapters.length
variance = Σ(length - mean)² / chapters.length
stdDeviation = √variance

Understanding how much chapter lengths vary helps us determine how flexible we can be in chapter assignment.

Step 3.Find Optimal Alpha (Flexibility Parameter)

This is the algorithm's secret sauce. Alpha determines how much flexibility we allow in daily verse counts. The algorithm uses binary search to find the maximum alpha value that:

  • Uses all available days (doesn't finish too early)
  • Minimizes variance in daily reading load
  • Avoids "chapter dumping" (excessive chapters on the final day)
// Binary search for optimal alpha
threshold = idealVersesPerDay × (1 + alpha)
// Try alpha values from 0 to ~2.0
for each alpha value:
distribute chapters using threshold
evaluate: days used, variance, dumping
select alpha with lowest variance

Higher alpha = more flexible (larger daily variations), Lower alpha = stricter balance (more consistent daily load)

Step 4.Greedy Chapter Assignment

Using the optimal alpha, the algorithm assigns chapters to days with a "greedy" approach. "Greedy" means it makes locally optimal decisions without looking ahead—it keeps adding chapters to the current day as long as they fit within the threshold, then moves to the next day.

This is fast and simple, but not perfect—which is why we need the optimization phase afterward. The greedy approach might create some imbalanced days, but it gives us a solid starting point.

currentDay = 0
currentDayVerses = 0
for each chapter in reading order:
// Greedy decision: "Can I fit this chapter today?"
if (currentDayVerses == 0 ||
currentDayVerses + chapter.verses ≤ threshold):
// Yes! Add it to today
assign chapter to currentDay
currentDayVerses += chapter.verses
else:
// No room today, start a new day
move to next day
currentDayVerses = 0

The greedy approach is simple: "Fill today's bucket until it's full, then start a new bucket tomorrow." It doesn't consider whether moving a chapter to tomorrow might create a better overall balance—that's what makes it greedy.

Step 5.Variance Reduction via Adjacent Swaps

After initial assignment, the algorithm performs two optimization phases:

Phase 1: Adjacent Day Balance

For each pair of adjacent days, try moving the last chapter from day N to day N+1. If this reduces the difference in verse counts between the two days, make the swap.

if |verses[day] - verses[day+1]| would decrease:
move last chapter from day to day+1

Phase 2: Global Balance

Similar to Phase 1, but evaluates swaps based on deviation from the ideal verses per day across all days.

currentDeviation = |verses[day] - ideal| + |verses[day+1] - ideal|
if swapping would reduce currentDeviation:
move last chapter from day to day+1

What This Achieves

Consistent Daily Load

Daily reading amounts stay remarkably consistent, typically within 20-30% of the ideal. No surprise "heavy days" that break your reading rhythm.

Natural Boundaries

The algorithm prioritizes ending each day at chapter boundaries when possible, keeping your reading experience logical and natural.

Minimized Variance

The algorithm achieves remarkably low variance in daily reading load, ensuring you never face unexpectedly long or short reading sessions.

Sustainable Engagement

By keeping daily reading consistent and manageable, the algorithm helps you build a sustainable Bible reading habit.

Example: Reading the Gospels in 30 Days

Input

  • Books: Matthew (28 ch), Mark (16 ch), Luke (24 ch), John (21 ch) = 89 chapters
  • Total verses: 3,779
  • Days: 30
  • Ideal verses/day: ~126

Algorithm Process

  1. Calculate ideal: 3,779 verses ÷ 30 days = 125.97 verses/day
  2. Analyze variance: chapter lengths range from 11 to 111 verses
  3. Find optimal alpha: ~0.45 (allows ~45% flexibility from ideal)
  4. Threshold: 125.97 × 1.45 = ~183 verses/day maximum
  5. Greedy assignment distributes 89 chapters across 30 days
  6. Adjacent swaps further optimize the balance

Output

  • Average: 126 verses/day (exactly on target)
  • Range: 94-158 verses/day (minimal variance)
  • Standard deviation: 18.3 verses (very consistent)
  • All days end at chapter boundaries

Limitations & Trade-offs

While the algorithm is sophisticated, it's important to understand its inherent constraints and design trade-offs.

Chapter Boundary Constraint

When using chapter-based distribution (chapters > days), the algorithm must keep entire chapters together to maintain natural reading boundaries. This creates an unavoidable challenge with extremely long chapters.

The most notable example is Psalm 119, which contains 176 verses—nearly twice the length of most reading plans' daily targets. When this chapter appears in your plan, that day will inevitably have a significantly higher reading load than others.

This is an architectural trade-off: we prioritize keeping chapters together (which creates more natural, meaningful reading sessions) over perfect mathematical balance. The alternative—splitting Psalm 119 mid-chapter—would disrupt the literary and thematic unity of the text.

Local vs. Global Optimization

The greedy chapter assignment makes locally optimal decisions—it doesn't look ahead to see if a different arrangement might produce better overall balance. This is by design for performance reasons.

To compensate, the algorithm follows up with two phases of adjacent swaps that improve the distribution. This hybrid approach balances computational efficiency with reading quality—perfect global optimization would be exponentially slower for longer reading plans.

Chapter Dumping Edge Cases

When the algorithm runs out of days before all chapters are assigned, it "dumps" remaining chapters onto the final day. While the alpha optimization actively tries to avoid this, certain combinations of content length and available days can still trigger it.

The algorithm detects when dumping occurs and adjusts the alpha parameter to find a better distribution, but in rare cases with very constrained day counts, some final-day overload may be unavoidable.

Sequential Group Processing

When you create multiple reading groups, they're always processed sequentially—you'll complete Group 1 entirely before starting Group 2. The algorithm cannot interleave groups or reorder them for better overall balance.

Days are allocated proportionally by verse count, which ensures fairness, but the sequential constraint means you can't, for example, alternate between Old and New Testament readings across different groups in the same plan.

The Result: Consistency Without Complexity

Despite these constraints, the algorithm achieves its primary goal: creating sustainable, balanced Bible reading plans that adapt to your schedule and reading preferences.

By combining mathematical optimization with practical reading boundaries, BiblePlan turns what could be an overwhelming commitment into a manageable daily habit. The algorithm handles the complexity—calculating ideal verse counts, optimizing distributions, and balancing daily loads—so you can focus on what matters: engaging with Scripture.

Ready to experience balanced Bible reading?

Create Your Reading Plan