If all the algebra and maths gives you a headache put your tax rate to 0 tear down your tavern and build a barracks instead happiness will be at 100 so population will be full you can levy your people and take gold off them plus everyone else seems to have billions of it =)

## Happiness

$ \lim hp \rightarrow hp_{target} $

$ hp_{target} = 100\% - tr + tl * 1\% $

$ hp $ may differ from $ hp_{target} $ when you hit "increase happiness" or "increase gold" in your castle, when you used a $ hp $ manipulating item or when you got a fairy. Also, $ hp_{target} $ may differ from $ hp $ if you changed the $ tr $ or the $ tl $.

## Gold Income

### Income by Taxes (Simplified)

- There is no such thing as overpopulation.
- Tax is applied to your current population whether they are working or not.
- Tax negatively affects happiness.
- Taverns positively affect happiness.
- Happiness affects population levels.
- Happiness = 100 – Tax rate + Tavern level
- Population = Max Population * happiness / 100
- Gross Income rate = Population * Tax rate / 100
- Net Income rate = Gross Income rate – cost of Knights.

### Income by Taxes (Formulae)

$ Income_{base}( \Delta t ) = population * tr * \frac{ \Delta t }{ 1 hour } $

$ \lim population \rightarrow population_{target} $

$ population_{target} = hp * population_{limit} $

The $ population_{limit} $ is the population limit which you can easily look at in your city profile. When population = population_target (which usually happens after you do nothing for a short while)

$ Income_{base}( \Delta t ) = population * tr = hp * tr * population_{limit} * \frac{ \Delta t }{ 1 hour } $

$ Income_{base}( \Delta t ) = (100\% - tr + tl * 1\% ) * tr * population_{limit} * \frac{ \Delta t }{ 1 hour } $

Simple calculus yields that Base Income reaches a maximum when the following equation is true:

$ 100\% - 2 * tr + tl * 1\% = 0 \Leftrightarrow tr = \frac{100\% + tl * 1\% }{2} = 50\% + \frac{tl * 1\% }{2} $

In other words, the best tax rate would be 50%; And every second tavern level, tax rate could be increased by one. For $ tr = 50\% $ and a tl of 0 (no tavern),

$ Income_{base}( \Delta t ) = 50\% * 50\% * population_{limit} * \frac{ \Delta t }{ 1 hour } = 25\% * population_{limit} * \frac{ \Delta t }{ 1 hour } $

A population limit of 7000, which is acquired with 7 level 4 cottages, the maximum income is 1750 in one hour. On the same $ tr $, $ population_{target} $ will be merely 50% of $ population_{limit} $ - which means you can only have 3500 working people, not taking into consideration the necessity of idle population for building an army.

### Income by "Increase Gold"

There is another way to generate gold, which is hitting the "Increase Gold" button in the castle of your city. Using that button gives you 10 gold per citizen you currently have. It is advisable to only use this button whenever your $ hp $ reaches $ hp_{target} $. This is about every 2 hours.

$ Income_{levy}( \Delta t ) = 10 * population * \frac{ \Delta t }{ 2 hours } = 5 * population * \frac{ \Delta t }{ 1 hours } $

A simple comparision shows that, with the same amount of population, the IC method has an output about 20 times as large as that of best taxes output.

Due to the decrease in $ hp $ (20 points per click on the IC button), you will have a population loss. The average population loss if you click once every two hours is about 8-12% - which is a lot smaller than 50%.

### Mixing the two

Some people argue that using a mix of taxation and IC yields the highest income.

Here is the mathematics so you can see for yourself:

$ Income_{levy}( \Delta t ) = 5 * population * \frac{ \Delta t }{ 1 hours } \approx 5 * 90\% * population_{ target } * \frac{ \Delta t }{ 1 hours } $

$ Income_{levy}( \Delta t ) \approx 4.5 * ( 100\% - tr + tl * 1\% ) * population_{ limit } * \frac{ \Delta t }{ 1 hours } $

The sum of Income when both methods are combined is as following:

$ Income( \Delta t ) = Income_{ levy }( \Delta t ) + Income_{ base }( \Delta t ) $

$ Income( \Delta t ) \approx 4.5 * ( 100\% - tr + tl * 1\% ) * population_{ limit } * \frac{ \Delta t }{ 1 hours } + (100\% - tr + tl * 1\% ) * tr * population_{limit} * \frac{ \Delta t }{ 1 hour } $

$ Income( \Delta t ) \approx ( 4.5 + tr ) * ( 100\% - tr + tl * 1\% ) * population_{ limit } * \frac{ \Delta t }{ 1 hours } $

Simple calculus yields that Income reaches a maximum when the following equation is true:

$ 4.5 tr + 100\% - 2 * tr + tl * 1\% = 0 \Leftrightarrow 2.5 tr = - 100\% - tl * 1\% \Leftrightarrow tr = - \frac{ 200 + tl }{ 5 } \% $

In other words, $ tr $ would actually have to be *negative* in order to reach the highest income possible. Since negative taxation is not possible, and a couple of behaviours of the function $ Income( \Delta t ) $ (those behaviours are easy to prove, but doing so would quite much go beyond the scope of this arcticle), the best we can reach in terms of tr is 0.

JonesDavidSerra: "Since setting tr to tl will yield the same happiness as setting tr to 0, I advise you to do so. Using above formula, however, it's obvious that the additional income achieved that way does hardly change the total Income. I hence recommend not to spend the resources and the building place needed for a tavern, and instead constructing one additional barracks. Your income will be greater than anything you need anyway."

MarcusWolfheart: To further simplify things in a math process that doesn't require a college education to follow, here's the information that most people want when looking at this page: What tax rate will give me the most income per hour? Short answer: 50% plus half your tavern level: Here's the math and two examples to prove the point...

Example town has a population capacity of 10000 (just to keep the math simple).

If your tax rate is set at 20% (the rating required by the early quest), your happiness will be at 80% without a tavern to modify your happiness value.

10000 (pop capacity) * .8 (happiness as a decimal value) = 8000 (current population)

Now, lets apply the tax rate:

8000 (current population) * .2 (tax rate as a decimal value) = 1600 (gold per hour before Salaries)

Here's the same process with a 50/50% tax/happiness setup:

10000 (pop capacity) * .5 (happiness as decimal value) = 5000 (current population)

5000 (Current population) * .5 (tax rate as a decimal value) = 2500 (gold per hour before salaries)

So even with a higher population, the lower tax rates do not yeild as much. The function is effecively a bell curve (without being modified), with the further away you are from 50%, the lower the yield of gold per hour. To account for taverns, split the difference between happiness and tax rate. So if you have a lvl 6 tavern, you'll want your tax rate to be at 53%, and your happiness at 53%. Let me show you why, using our previous example city with a lvl 6 tavern:

With Tax rate set to 56%:

10000 * .5 = 5000

5000 * .56 = 2800

With Tax rate set to 50%:

10000 * .56 = 5600

5600 * .5 = 2800

Result: No change. Now lets split the taven bonus between happiness and tax rate by splitting the difference:

With tax rate set to 53%

10000 * .53 = 5300

5300 * .53 = 2809.

The increase is miniscule at this population level, but it does add up over time. Then again, having the spare bodies might be well worth it when your city gets large.