Chessboard Rice Calculator
Grains on a square and total to there with doubling math.
What it does
Legend doubles rice per chess square: one grain first, two second, four third, and so on. Totals explode fast, passing millions before square 30 and trillions soon after.
The tool above takes square n and returns grains on that square, total to there, and weight at 0.025 grams per grain. The default 16 matches the worked example, so the page opens showing 32,768. Type a new square to update all three results.
Square grains are 2^(n-1). Total is 2^n minus 1. Weight multiplies total by grain mass. Here square 16 holds 32,768 with total 65,535 near 1.64 kilograms.
Use this to teach exponents, test big integer guards, and size impossible legends. Real harvests never reach late squares: square 53 already needs hundreds of trillions of grains.
This page shows the formulas, one full hand checked example at square 16, a reference table, and practice checks that run through the tool.
How to use
- Type square 1 to 53.
- Read Grains on square as 2^(n-1).
- Read Total as 2^n minus 1.
- Read Weight at 0.025 g per grain.
- Try 8 then 20 to feel doubling.
- Split huge totals into tons for sense.
Formula
- n
- Square 1 to 53.
- square
- Grains on that square.
- total
- Grains squares 1 to n.
Cap at 53 keeps JavaScript integers exact. Square 64 needs big integers outside this simple tool.
Worked example
Example: square 16
Find grains on square 16 and total to there.
- Square: 2^15 = 32,768 grains.
- Total: 2^16 minus 1 = 65,536 minus 1 = 65,535.
- Weight: 65,535 x 0.025 g = 1,638.375 g.
- Kilos: 1.64 kg.
- Check: total is twice square minus 1.
- Next square 17 would hold 65,536.
Reference table
| Square | On square | Total |
|---|---|---|
| 1 | 1 | 1 |
| 8 | 128 | 255 |
| 16 | 32,768 | 65,535 |
| 20 | 524,288 | 1,048,575 |
Limits
- Squares 1 to 53 for exact integers.
- Legend math only. Real yields differ.
- Grain mass 0.025 g assumed.
- No harvesting model here.
Common mistakes
- Using 2^n for square n instead of 2^(n-1).
- Forgetting minus 1 in total.
- Running square 64 in doubles and losing exactness.
- Reading total as square n+1.
- Mixing grains with weight without grain mass.
Try it yourself
Quick checks. Answers sit tucked under each question.
Square 8?
128 grains, total 255, weight 0.01 kg.
Square 20?
524,288 grains, total 1,048,575, weight 26.21 kg.
Questions
Square 16?
32,768 grains.
Total?
2^n minus 1. Here 65,535.
Weight?
Total times 0.025 g. Here 1.64 kg.
Why cap 53?
Exact integers in browser math.
Square 64?
Needs big integers outside here.
Legend?
Doubling tale for exponents.